From: dmv Date: Tue, 7 Oct 2008 05:55:13 +0000 (+0000) Subject: Impossible to Delete a presentation object through the reference on it. Regression... X-Git-Tag: V4_1_0_maintainance_20081009~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0fd2e1930c398862330ecf33babc0a57b47cca12;p=modules%2Fvisu.git Impossible to Delete a presentation object through the reference on it. Regression to version 3.2.1 --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index b8cdfba0..36dcc5ac 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1339,11 +1339,22 @@ VisuGUI Handle(SALOME_InteractiveObject) anIO; for (SALOME_ListIteratorOfListIO it (aList); it.More(); it.Next()) { anIO = it.Value(); - aNameList.append("\n - "); - aNameList.append(anIO->getName()); if (anIO->hasEntry()) { - if (IsRemovable(anIO->getEntry(), this)) + if (IsRemovable(anIO->getEntry(), this)) { + aNameList.append("\n - "); + // Get Name Of the Main Object if it's a referenced object + VISU::TObjectInfo anObjectInfo = GetObjectByEntry(GetAppStudy(this), anIO->getEntry()); + if(_PTR(SObject) aSObject = anObjectInfo.mySObject){ + _PTR(SObject) aRefSObject; + if (aSObject->ReferencedObject(aRefSObject)) { + QString aRefName ( aRefSObject->GetName() ); + aNameList.append( aRefName ); + } + else + aNameList.append(anIO->getName()); + } anEntries[i++] = anIO->getEntry(); + } } } nbSelected = i; diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 4e2f4e8e..2cea6bb6 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -416,7 +416,7 @@ namespace VISU // 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) + if ( (aRefBase && aRefBase->GetType() == VISU::TCURVE) || (aRefBase && aRefBase->GetType() == VISU::TMESH) ) return true; }