From: mkr Date: Wed, 24 Jun 2015 15:04:22 +0000 (+0300) Subject: refs #534: fix the case "3. If the only zone from the region has been selected."... X-Git-Tag: v1.4.2~37^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f36e5a42028f11caa32f6e2cc7041b68d8c47645;p=modules%2Fhydro.git refs #534: fix the case "3. If the only zone from the region has been selected." (It has no sense to create new zone region from region, consisting from only one zone.) --- diff --git a/src/HYDROGUI/HYDROGUI_DataBrowser.cxx b/src/HYDROGUI/HYDROGUI_DataBrowser.cxx index 9092fa87..eb5f2539 100644 --- a/src/HYDROGUI/HYDROGUI_DataBrowser.cxx +++ b/src/HYDROGUI/HYDROGUI_DataBrowser.cxx @@ -342,6 +342,14 @@ void HYDROGUI_DataBrowser::createPopupMenu( QMenu* theMenu ) isOnlyZones = aModelObj->GetKind()==KIND_ZONE; if( !isOnlyZones ) break; + + SUIT_DataObject* aParentObj = aHydroObj->parent(); + if ( aParentObj ) + { + isOnlyZones = aParentObj->childCount() > 1; + if( !isOnlyZones ) + break; + } } else {