From: asl Date: Fri, 30 Sep 2005 07:00:00 +0000 (+0000) Subject: PAL9491 - "View"->"Display mode"->"Shading" causes crash X-Git-Tag: V3_1_0a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd7d74f00e4e2311ad56a8d75a01c41b04be03de;p=modules%2Fgeom.git PAL9491 - "View"->"Display mode"->"Shading" causes crash --- diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index b329a2f62..c8775f096 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -105,8 +105,10 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) { myDisplayGUI->InvertDisplayMode(); int newMode = myDisplayGUI->GetDisplayMode(); - SUIT_Session::session()->activeApplication()->desktop()->menuBar()-> - changeItem( 211, newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") ); + getGeometryGUI()->action( 211 )->setMenuText( newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") ); + getGeometryGUI()->menuMgr()->update(); +// SUIT_Session::session()->activeApplication()->desktop()->menuBar()-> +// changeItem( 211, newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") ); break; } case 212: // MENU VIEW - DISPLAY ALL diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index d671e02ab..8ed80aee2 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -184,6 +184,8 @@ private: QPtrList myVTKSelectors; SalomeApp_Displayer* myDisplayer; + +friend class DisplayGUI; }; #endif