From: asv Date: Thu, 4 May 2006 08:12:54 +0000 (+0000) Subject: Interface of action() virtual function has changed: now it returns bool. 'true'... X-Git-Tag: mergeto_trunk_06May06~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71fed18d33813107ba793868831ca382895f2a46;p=modules%2Fvisu.git Interface of action() virtual function has changed: now it returns bool. 'true' return value means that the event (key accelerator action) is handled and should NOT be passed further, 'false' -- event is NOT handled. --- diff --git a/src/VVTK/VVTK_ViewWindow.cxx b/src/VVTK/VVTK_ViewWindow.cxx index a181ad6a..0b012ab2 100755 --- a/src/VVTK/VVTK_ViewWindow.cxx +++ b/src/VVTK/VVTK_ViewWindow.cxx @@ -258,14 +258,17 @@ VVTK_ViewWindow } //---------------------------------------------------------------------------- -void +bool VVTK_ViewWindow ::action( const int accelAction ) { - if(myMainWindow1->hasFocus()) - myMainWindow1->action(accelAction); - if(myMainWindow2->hasFocus()) - myMainWindow2->action(accelAction); + if ( myMainWindow1->hasFocus() ) + myMainWindow1->action( accelAction ); + else if ( myMainWindow2->hasFocus() ) + myMainWindow2->action( accelAction ); + else + return false; + return true; } //---------------------------------------------------------------------------- diff --git a/src/VVTK/VVTK_ViewWindow.h b/src/VVTK/VVTK_ViewWindow.h index 54e4745d..6920527c 100755 --- a/src/VVTK/VVTK_ViewWindow.h +++ b/src/VVTK/VVTK_ViewWindow.h @@ -105,7 +105,7 @@ public slots: //---------------------------------------------------------------------------- protected: virtual - void + bool action( const int ); virtual QImage dumpView();