From ffa4242037d4ed8a59b0f251898ecabf2fd6a388 Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 27 Nov 2006 12:32:49 +0000 Subject: [PATCH] Use AttributeName and module title for correct "Delete" popup item displaying in object browser popup. --- src/VISUGUI/VisuGUI_Tools.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; } } } -- 2.39.2