From 71fed18d33813107ba793868831ca382895f2a46 Mon Sep 17 00:00:00 2001 From: asv Date: Thu, 4 May 2006 08:12:54 +0000 Subject: [PATCH] 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. --- src/VVTK/VVTK_ViewWindow.cxx | 13 ++++++++----- src/VVTK/VVTK_ViewWindow.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) 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(); -- 2.39.2