connect( mySubShapesChk, SIGNAL( stateChanged( int ) ), this, SLOT( onSubShapesChk() ) );
connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
connect(myDetectBtn, SIGNAL(clicked()), this, SLOT(onDetect()));
myEditCurrentArgument->setFocus();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
qApp->processEvents();
updateGeometry();
//=================================================================================
void RepairGUI_GlueDlg::SelectionIntoArgument()
{
- if ( mySubShapesChk->isChecked() && getConstructorId() == 1 )
+ if ( mySubShapesChk->isChecked() && getConstructorId() == 1 ) {
+ updateButtonState();
return;
+ }
erasePreview();
myEditCurrentArgument->setText("");
void RepairGUI_GlueDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
//GroupPoints->LineEdit1->setText("");
msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" );
}
+ connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
SUIT_MessageBox::info1( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, "Close" );
updateButtonState();
activateSelection();
int anId = getConstructorId();
if ( anId == 0 ) // Case of whole gluing
{
- disconnect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
+ disconnect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
globalSelection( GEOM_ALLSHAPES );
if (myObject->_is_nil())
SelectionIntoArgument();
- connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
+ connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
}
else // Second case of gluing
{
else
{
displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED );
+ disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
globalSelection( GEOM_PREVIEW );
- }
+ connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
+ }
}
-
updateViewer();
}
}
else
{
+ bool wasSelected = false;
+ SALOME_ListIteratorOfListIO it ( selectedIO() );
+ if (it.More() > 0)
+ wasSelected = true;
bool wasDetected = myTmpObjs.size() ? true : false;
- buttonOk->setEnabled( hasMainObj && wasDetected );
- buttonApply->setEnabled( hasMainObj && wasDetected );
+ buttonOk->setEnabled( hasMainObj && wasDetected && wasSelected);
+ buttonApply->setEnabled( hasMainObj && wasDetected && wasSelected);
mySubShapesChk->setEnabled( hasMainObj && wasDetected );
myDetectBtn->setEnabled( hasMainObj );
if ( !hasMainObj || !wasDetected )