]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Context popup menu invocation was improved.
authorstv <stv@opencascade.com>
Tue, 7 Jun 2005 05:19:59 +0000 (05:19 +0000)
committerstv <stv@opencascade.com>
Tue, 7 Jun 2005 05:19:59 +0000 (05:19 +0000)
src/ObjBrowser/OB_Browser.cxx

index 286eed874d3cea5deeeb943511ab6d52de637410..419933094d5204b41fd5d16a9072000ae6cce6da 100755 (executable)
@@ -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 )