Avoid redisplaying of the shape after Apply action.

This commit is contained in:
rnv 2012-06-09 08:30:26 +00:00
parent ed2c8fe24c
commit 2c2a70a69a

View File

@ -297,6 +297,7 @@ void GroupGUI_GroupDlg::ClickOnOk()
setIsApplyAndClose(true);
if (ClickOnApply())
ClickOnCancel();
setIsApplyAndClose(false);
}
//=================================================================================
@ -305,9 +306,15 @@ void GroupGUI_GroupDlg::ClickOnOk()
//=================================================================================
bool GroupGUI_GroupDlg::ClickOnApply()
{
if (!onAccept(myMode == CreateGroup, true))
if(!isApplyAndClose())
setIsDisableBrowsing( true );
if (!onAccept(myMode == CreateGroup, true,isApplyAndClose()))
return false;
if(!isApplyAndClose())
setIsDisableBrowsing( false );
if (myMode == CreateGroup)
{
initName();
@ -827,6 +834,8 @@ void GroupGUI_GroupDlg::setShapeType(const TopAbs_ShapeEnum theType)
//=================================================================================
void GroupGUI_GroupDlg::activateSelection()
{
bool isApply = ((QPushButton*)sender() == buttonApply());
if(!isApply)
erasePreview(false);
// local selection
@ -853,7 +862,7 @@ void GroupGUI_GroupDlg::activateSelection()
}
}
}
if(!isApply) {
int prevDisplayMode = aDisplayer->SetDisplayMode(0);
SUIT_ViewWindow* aViewWindow = 0;
@ -918,6 +927,7 @@ void GroupGUI_GroupDlg::activateSelection()
aDisplayer->UpdateViewer();
aDisplayer->SetDisplayMode(prevDisplayMode);
}
}
globalSelection(GEOM_ALLSHAPES);