From: stv Date: Tue, 7 Jun 2005 05:19:59 +0000 (+0000) Subject: Context popup menu invocation was improved. X-Git-Tag: T3_0_0_a2~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df63f9345b7280b239f6d7c165ab008766950a8c;p=modules%2Fgui.git Context popup menu invocation was improved. --- diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 286eed874..419933094 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -82,6 +82,7 @@ myRootDecorated( true ) myView->setRootIsDecorated( true ); myView->setSelectionMode( QListView::Extended ); myView->installEventFilter( this ); + myView->viewport()->installEventFilter( this ); QVBoxLayout* main = new QVBoxLayout( this ); main->addWidget( myView ); @@ -909,7 +910,7 @@ bool OB_Browser::eventFilter( QObject* o, QEvent* e ) contextMenuRequest( ce ); return true; } - if ( o == myView && e->type() == QEvent::MouseButtonRelease ) + if ( o == myView->viewport() && e->type() == QEvent::MouseButtonRelease ) { QMouseEvent* me = (QMouseEvent*)e; if ( me->button() == RightButton )