]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL20317 It's impossible to Delete either a reference or an object through reference...
authordmv <dmv@opencascade.com>
Thu, 4 Sep 2008 14:33:56 +0000 (14:33 +0000)
committerdmv <dmv@opencascade.com>
Thu, 4 Sep 2008 14:33:56 +0000 (14:33 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_Tools.cxx

index 3d7fcc0f79166f5529695ae61fd473fdef683f3e..cbdad67eccf2dcf9920566940ce83854f5b81529 100644 (file)
@@ -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),
index 6df04f65092323dc0e5d3a51220737a7fe6d4dca..678fd590b4e1796dd56d4f501d9f33ee3a641f01 100644 (file)
@@ -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")) {