]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Forum: Warning Dialog in "Create Group" doesn't disappear
authorimn <imn@opencascade.com>
Wed, 5 Mar 2014 08:55:14 +0000 (12:55 +0400)
committerimn <imn@opencascade.com>
Wed, 5 Mar 2014 08:55:14 +0000 (12:55 +0400)
src/GroupGUI/GroupGUI_GroupDlg.cxx

index 464bee9e5c1e5094ead4ff3f62d2fdcb0a31d6e1..70e1b83086ede44c7a7e0c4a8336dc8d0a263f66 100644 (file)
@@ -787,12 +787,16 @@ int GroupGUI_GroupDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMap
             TopExp::MapShapes(aMainShape, aMainMap);
 
             TopExp_Explorer anExp (aShape, getShapeType());
+            bool isShowWarning = true;
             for (; anExp.More(); anExp.Next()) {
               TopoDS_Shape aSubShape = anExp.Current();
               int anIndex = aMainMap.FindIndex(aSubShape);
               if (anIndex == 0) {
-                SUIT_MessageBox::warning(app->desktop(), QObject::tr("WRN_WARNING"),
+                if (isShowWarning) {
+                  SUIT_MessageBox::warning(app->desktop(), QObject::tr("WRN_WARNING"),
                                          tr("WRN_NOT_SUBSHAPE"));
+                  isShowWarning = false;
+                }
               }
               else {
                 if (subSelectionWay() != ALL_SUBSHAPES &&