qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
+ SelectionIntoArgument();
myEditCurrentArgument->setFocus();
globalSelection(); // close local contexts, if any
myPoints->length( 0 );
myEditCurrentArgument->setText( "" );
+ qApp->processEvents();
+ updateGeometry();
+ resize( minimumSizeHint() );
+ SelectionIntoArgument();
}
initName( tr( "GEOM_ELLIPSE" ) );
- resize(100,100);
+ resize( minimumSizeHint() );
+ SelectionIntoArgument();
displayPreview();
}
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
-
SelectionIntoArgument();
}
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
+ SelectionIntoArgument();
myEditCurrentArgument->setFocus();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
+ SelectionIntoArgument();
displayPreview();
}
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_FACE" ) );
+ SelectionIntoArgument();
}
QList<int> aSubShapes;
aSubShapes.append( GEOM_FACE );
globalSelection( aMap, aSubShapes );
-
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_SHELL" ) );
+ SelectionIntoArgument();
}
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_WIRE" ) );
+ SelectionIntoArgument();
}
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
}
//=================================================================================
myEditCurrentArgument->setFocus();
connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ SelectionIntoArgument();
}
//=================================================================================
PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
- myInitial(true)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
{
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_2P")));
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BOX_DXYZ")));
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- myInitial = false;
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
// clear selection
//disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
- //if (myInitial)
- // myInitial = false;
- //else
- // myGeomGUI->getApp()->selectionMgr()->clearSelected();
if (send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1;
private:
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the vector */
- // to initialize the first selection field with a selected object on the dialog creation
- bool myInitial;
-
DlgRef_2Sel* GroupPoints;
DlgRef_3Spin* GroupDimensions;
//=================================================================================
PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
- myInitial(true)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
{
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_CONE_PV")));
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_CONE_DXYZ")));
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- myInitial = false;
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
private:
GEOM::GEOM_Object_var myPoint, myDir;
- // to initialize the first selection field with a selected object on the dialog creation
- bool myInitial;
-
DlgRef_2Sel3Spin* GroupPoints;
DlgRef_3Spin* GroupDimensions;
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- myInitial = false;
- if (constructorId == 0) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- }
- else {
- displayPreview();
- }
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
//=================================================================================
PrimitiveGUI_DiskDlg::PrimitiveGUI_DiskDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
- myInitial(true)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
{
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_DISK_PNT_VEC_R")));
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- myInitial = false;
- if (constructorId == 1 || constructorId == 2) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- }
- else {
- displayPreview();
- }
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
private:
GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
- // to initialize the first selection field with a selected object on the dialog creation
- bool myInitial;
-
DlgRef_2Sel1Spin* GroupPntVecR;
DlgRef_3Sel* Group3Pnts;
DlgRef_1Spin* GroupDimensions;
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
+ SelectionIntoArgument();
displayPreview();
}
//=================================================================================
PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
- myInitial(true)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
{
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_TORUS_PV")));
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- myInitial = false;
- if (constructorId == 0) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- }
- else {
- displayPreview();
- }
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
private:
GEOM::GEOM_Object_var myPoint, myDir;
- // to initialize the first selection field with a selected object on the dialog creation
- bool myInitial;
-
DlgRef_2Sel2Spin* GroupPoints;
DlgRef_2Spin* GroupDimensions;
globalSelection( GEOM_ALLSHAPES );
resize(100,100);
+ SelectionIntoArgument();
}