X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FHYDROGUI%2FHYDROGUI_DataBrowser.cxx;h=eb5f2539e9528b890fa1fa61dd49f6743b6bd33f;hb=39b1848f103d89cfb544a1651b3fbf221fc2c401;hp=57d868a19f18ad277be9623711f6067442c50fef;hpb=f9bd5128a1aed8c1974b1d1cfb87aff32191fa60;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_DataBrowser.cxx b/src/HYDROGUI/HYDROGUI_DataBrowser.cxx index 57d868a1..eb5f2539 100644 --- a/src/HYDROGUI/HYDROGUI_DataBrowser.cxx +++ b/src/HYDROGUI/HYDROGUI_DataBrowser.cxx @@ -188,7 +188,10 @@ void HYDROGUI_OBSelector::fillEntries( QMap& entr } -HYDROGUI_DataBrowser::HYDROGUI_DataBrowser( HYDROGUI_Module* theModule, SUIT_DataObject* theRoot, QWidget* theParent ) +HYDROGUI_DataBrowser::HYDROGUI_DataBrowser( HYDROGUI_Module* theModule, + SUIT_DataObject* theRoot, + QWidget* theParent, + bool theLandCover/* = false*/) : SUIT_DataBrowser( theRoot, theParent ), myModule( theModule ) { SUIT_ResourceMgr* resMgr = theModule->getApp()->resourceMgr(); @@ -211,7 +214,11 @@ HYDROGUI_DataBrowser::HYDROGUI_DataBrowser( HYDROGUI_Module* theModule, SUIT_Dat QString EntryCol = QObject::tr( "ENTRY_COLUMN" ); QString RefObjCol = tr( "REF_OBJECT_COLUMN" ); - QString AltitudeCol = tr( "ALTITUDE_COLUMN" ); + QString AltitudeCol; + if ( theLandCover ) + AltitudeCol = tr( "LAND_COVER_COLUMN" ); + else + AltitudeCol = tr( "ALTITUDE_COLUMN" ); SUIT_AbstractModel* treeModel = dynamic_cast( model() ); //RKV: treeModel->setSearcher( theModule->getApp() ); @@ -335,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 {