From: asv Date: Fri, 17 Jun 2005 06:05:05 +0000 (+0000) Subject: fix for bug: "rename" can be called even when there is no active viewer. X-Git-Tag: T3_0_0_a4~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=650baae06dbdd49285e82265e2cfc51db6ad7279;p=modules%2Fgeom.git fix for bug: "rename" can be called even when there is no active viewer. --- diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 667cf2eb0..26cdca2ae 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -287,12 +287,15 @@ void GeometryGUI::OnGUIEvent() void GeometryGUI::OnGUIEvent( int id ) { SUIT_Desktop* desk = application()->desktop(); - // check if current viewframe is of OCC type + + // check type of the active viewframe SUIT_ViewWindow* window = desk->activeWindow(); bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() ); bool ViewVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() ); // if current viewframe is not of OCC and not of VTK type - return immediately - if( !ViewOCC && !ViewVTK ) + // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example) + bool NotViewerDependentCommand = ( id == 901 ); + if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand ) return; // fix for IPAL9103, point 2