From 54ab0f94ccc8fa00c80e8c914bf40fdf67688719 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 4 Sep 2008 14:31:55 +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 cc52fc60..b8cdfba0 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1352,6 +1352,7 @@ VisuGUI QObject::tr("WRN_VISU"), QObject::tr("WRN_NO_APPROPRIATE_SELECTION"), QObject::tr("BUT_OK")); + return; } if ( SUIT_MessageBox::warn2( GetDesktop(this), diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index a349bb95..35b0ad37 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -409,6 +409,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