From b48c1ee1a89d6f6762738f73ed4fb8448a21f46a Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 4 Sep 2008 14:33:56 +0000 Subject: [PATCH] IPAL20317 It's impossible to Delete either a reference or an object through reference in presentation. Regress to version 3.2.1 --- src/VISUGUI/VisuGUI.cxx | 1 + src/VISUGUI/VisuGUI_Tools.cxx | 9 +++++++++ 2 files changed, 10 insertions(+) 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")) { -- 2.39.2