From: dmv Date: Thu, 4 Sep 2008 14:33:56 +0000 (+0000) Subject: IPAL20317 It's impossible to Delete either a reference or an object through reference... X-Git-Tag: V5_1_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b48c1ee1a89d6f6762738f73ed4fb8448a21f46a;p=modules%2Fvisu.git IPAL20317 It's impossible to Delete either a reference or an object through reference in presentation. Regress to version 3.2.1 --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 3d7fcc0f..cbdad67e 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1356,6 +1356,7 @@ VisuGUI SUIT_MessageBox::warning(GetDesktop(this), QObject::tr("WRN_VISU"), QObject::tr("WRN_NO_APPROPRIATE_SELECTION")); + return; } if ( SUIT_MessageBox::question( GetDesktop(this), diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 6df04f65..678fd590 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -415,6 +415,15 @@ namespace VISU _PTR(GenericAttribute) anAttr; _PTR(AttributeString) aComment; + _PTR(SObject) aRefSObject; + if (aSObject->ReferencedObject(aRefSObject)) { + // It can be a reference on curve, published under a container. IPAL 20317 + VISU::TObjectInfo aRefObjectInfo = GetObjectByEntry(GetAppStudy(theModule), aRefSObject->GetID()); + VISU::Base_i* aRefBase = aRefObjectInfo.myBase; + if(aRefBase && aRefBase->GetType() == VISU::TCURVE) + return true; + } + bool isUnderVISU = false; _PTR(SObject) aFatherSObject = aSObject->GetFather(); if (aFatherSObject->FindAttribute(anAttr, "AttributeName")) {