]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL9828 - regression of Plot2d legend
authorasl <asl@opencascade.com>
Thu, 24 Nov 2005 08:35:01 +0000 (08:35 +0000)
committerasl <asl@opencascade.com>
Thu, 24 Nov 2005 08:35:01 +0000 (08:35 +0000)
src/VISUGUI/VisuGUI.cxx

index f190ea8530cc66b7369bc0f2e5bcbb231d94a73d..5085697509f6c827c6bca782aa16b4120565dc4b 100644 (file)
@@ -62,6 +62,7 @@
 #include "SPlot2d_ViewModel.h"
 #include "VisuGUI_SetupPlot2dDlg.h"
 #include "Plot2d_SetupCurveDlg.h"
+#include "Plot2d_ViewManager.h"
 
 #include "OB_Browser.h"
 
@@ -1539,6 +1540,20 @@ OnRename()
       // rename the study object
       aName->SetValue(Name.latin1()); // rename the SObject
       anIO->setName(Name.latin1()); // rename the InteractiveObject
+      
+      ViewManagerList pvm_list;
+      getApp()->viewManagers( SPlot2d_Viewer::Type(), pvm_list );
+      for( SUIT_ViewManager* mgr = pvm_list.first(); mgr; mgr = pvm_list.next() )
+      {
+       Plot2d_ViewManager* pvm = dynamic_cast<Plot2d_ViewManager*>( mgr );
+       if( pvm )
+       {
+         SPlot2d_Viewer* pv = dynamic_cast<SPlot2d_Viewer*>( pvm->getViewModel() );
+         if( pv )
+           pv->renameAll( anIO, Name.latin1() );
+       }
+      }
+
       UpdateObjBrowser(this, false);
 
       QApplication::restoreOverrideCursor();