Forum: Warning Dialog in "Create Group" doesn't disappear

This commit is contained in:
imn 2014-03-05 12:55:14 +04:00
parent 61a30de68f
commit ece8933d2e

View File

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