From: eap Date: Mon, 21 May 2007 14:32:20 +0000 (+0000) Subject: PAL16008 (Sketcher Validation should be equal to Apply&Close) X-Git-Tag: V3_2_7~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2001e82cc5f2a64e6da7e453ec05590f09c8b737;p=modules%2Fgeom.git PAL16008 (Sketcher Validation should be equal to Apply&Close) --- diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 5ec84cfe2..6a22a9cc9 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -738,7 +738,18 @@ void EntityGUI_SketcherDlg::ClickOnEnd() myCommand.append( ":WW" ); } else + { + // PAL16008 (Sketcher Validation should be equal to Apply&Close) + if (Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() || + Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() || + Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() || + Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() || + Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) + { + ClickOnApply(); + } myIsAllAdded = true; + } if( myCommand.size() > 2 ) if( !onAccept() ) @@ -753,7 +764,8 @@ void EntityGUI_SketcherDlg::ClickOnEnd() //================================================================================= bool EntityGUI_SketcherDlg::ClickOnApply() { - ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948) + if (sender() && sender()->inherits("QPushButton")) + ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948) myCommand.append( GetNewCommand() ); mySketchState = NEXT_POINT;