//================================================================================
StdMeshersGUI_LayerDistributionParamWdg
-::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr hyp,
- const QString& theName,
- QDialog* dlg):
- QWidget(), myName(theName), myDlg( dlg )
+::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr holderHyp,
+ SMESH::SMESH_Hypothesis_ptr distribHyp,
+ const QString& name,
+ QDialog* dlg):
+ QWidget(), myName(name), myDlg( dlg )
{
+ myHolderHyp = SMESH::SMESH_Hypothesis::_duplicate( holderHyp );
init();
- set( hyp );
-// if ( IsOk() )
-// onEdit();
+ set( distribHyp );
}
//================================================================================
myHyp = SMESH::SMESH_Hypothesis::_nil();
if ( !CORBA::is_nil( hyp )) {
myHyp = SMESH::SMESH_Hypothesis::_duplicate( hyp );
+ myHyp->SetHolderHypothesis( myHolderHyp );
myEditButton->setEnabled( true );
myCreateButton->setText( tr("CHANGE_TYPE"));
myParamValue = hyp->GetName();
//================================================================================
/*!
- * \brief Create a leayout, initialize fields
+ * \brief Create a layout, initialize fields
*/
//================================================================================
Q_OBJECT
public:
- StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
- const QString&,
- QDialog*);
+ StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr holderHyp,
+ SMESH::SMESH_Hypothesis_ptr distribHyp,
+ const QString& name,
+ QDialog* dlg);
~StdMeshersGUI_LayerDistributionParamWdg();
SMESH::SMESH_Hypothesis_var GetHypothesis() { return myHyp; }
private:
SMESH::SMESH_Hypothesis_var myHyp;
+ SMESH::SMESH_Hypothesis_var myHolderHyp;
SMESHGUI* mySMESHGUI;
QPushButton* myCreateButton;
item.myName = tr( "SMESH_LAYERS_DISTRIBUTION" ); p.append( item );
initVariableName( hyp, item, "SetLayerDistribution" );
- customWidgets()->append
- ( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
+ customWidgets()->append ( new StdMeshersGUI_LayerDistributionParamWdg
+ ( h, h->GetLayerDistribution(), hypName(), dlg() ));
}
else if( hypType()=="NumberOfLayers2D" )
{
item.myName = tr( "SMESH_LAYERS_DISTRIBUTION" ); p.append( item );
initVariableName( hyp, item, "SetLayerDistribution" );
- customWidgets()->append
- ( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
+ customWidgets()->append ( new StdMeshersGUI_LayerDistributionParamWdg
+ ( h, h->GetLayerDistribution(), hypName(), dlg() ));
}
else if( hypType()=="ProjectionSource1D" )
{