From: asl Date: Thu, 24 Nov 2005 08:35:01 +0000 (+0000) Subject: PAL9828 - regression of Plot2d legend X-Git-Tag: BR_3_1_0_deb~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37ee6227635c613d8b40f46a3b00e99669086e62;p=modules%2Fvisu.git PAL9828 - regression of Plot2d legend --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index f190ea85..50856975 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -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( mgr ); + if( pvm ) + { + SPlot2d_Viewer* pv = dynamic_cast( pvm->getViewModel() ); + if( pv ) + pv->renameAll( anIO, Name.latin1() ); + } + } + UpdateObjBrowser(this, false); QApplication::restoreOverrideCursor();