From: maintenance team Date: Wed, 20 Sep 2006 13:06:43 +0000 (+0000) Subject: BUG IPAL13407: Fixed X-Git-Tag: V3_2_3pre1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8480689ba07c45f02c34411aa18141e0cf43cccb;p=modules%2Fgeom.git BUG IPAL13407: Fixed --- diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index fc8253cc8..721eef1bb 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -2958,3 +2958,7 @@ msgstr "Default display mode" msgid "PREF_TAB_SETTINGS" msgstr "Settings" + +msgid "ERROR_SHAPE_TYPE" +msgstr "Object of incorrect type selected!\nPlease, select face, shell or solid and try again" + diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index df59894a7..6a33e47e8 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -270,7 +270,18 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation() //================================================================================= bool TransformationGUI_OffsetDlg::isValid( QString& msg ) { - return !(myObjects.length() == 0); + //return !(myObjects.length() == 0); + if (myObjects.length() == 0) return false; + + for (int i = 0; i < myObjects.length(); i++) + { + GEOM::shape_type aType = myObjects[i]->GetShapeType(); + if( aType != GEOM::FACE && aType != GEOM::SHELL && aType != GEOM::SOLID ){ + msg = tr("ERROR_SHAPE_TYPE"); + return false; + } + } + return true; } @@ -288,6 +299,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) if (GroupPoints->CheckButton1->isChecked() || IsPreview()) for (int i = 0; i < myObjects.length(); i++) { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() );