mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-23 03:45:37 +05:00
IPAL 18079
This commit is contained in:
parent
0040988ed9
commit
66d3644fbf
@ -294,8 +294,10 @@ bool RepairGUI_GlueDlg::ClickOnApply()
|
||||
//=================================================================================
|
||||
void RepairGUI_GlueDlg::SelectionIntoArgument()
|
||||
{
|
||||
if ( mySubShapesChk->isChecked() && getConstructorId() == 1 )
|
||||
if ( mySubShapesChk->isChecked() && getConstructorId() == 1 ) {
|
||||
updateButtonState();
|
||||
return;
|
||||
}
|
||||
|
||||
erasePreview();
|
||||
myEditCurrentArgument->setText("");
|
||||
@ -651,6 +653,8 @@ void RepairGUI_GlueDlg::onDetect()
|
||||
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();
|
||||
@ -684,10 +688,13 @@ void RepairGUI_GlueDlg::activateSelection()
|
||||
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();
|
||||
}
|
||||
|
||||
@ -706,9 +713,13 @@ void RepairGUI_GlueDlg::updateButtonState()
|
||||
}
|
||||
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 )
|
||||
|
Loading…
Reference in New Issue
Block a user