From: mkr Date: Mon, 27 Nov 2006 12:32:49 +0000 (+0000) Subject: Use AttributeName and module title for correct "Delete" X-Git-Tag: mergefrom_ScalarMap_ON_GROUP_3_2_0_30Nov06~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ffa4242037d4ed8a59b0f251898ecabf2fd6a388;p=modules%2Fvisu.git Use AttributeName and module title for correct "Delete" popup item displaying in object browser popup. --- diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index f1a23c01..14058e8b 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -68,6 +68,8 @@ #include #include +#include + //============================================================================= namespace VISU @@ -392,10 +394,13 @@ namespace VISU bool isUnderVISU = false; _PTR(SObject) aFatherSObject = aSObject->GetFather(); - if (aFatherSObject->FindAttribute(anAttr, "AttributeString")) { - _PTR(AttributeString) aComment (anAttr); + if (aFatherSObject->FindAttribute(anAttr, "AttributeName")) { + // mkr : 24.11.2006 : use AttributeName and module title for correct "Delete" + // popup item displaying in object browser popup + _PTR(AttributeName) aComment (anAttr); aNAME = aComment->Value(); - if (aNAME == aVisuNAME) { + QString aVisuTITLE = theModule->getApp()->moduleTitle(QString(aVisuNAME)); + if (!aVisuTITLE.compare(QString(aNAME))) { isUnderVISU = true; } } @@ -418,7 +423,7 @@ namespace VISU } if (!isUnderVISU) { // Father is not directly under VISU component - return false; + return false; } } }