mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Use global event handler for tracking active plot window
This commit is contained in:
1 parent
ff4a54121f
commit
967975828c
3 files changed
+20
-10
No files matched your search
@@ -440,10 +440,11 @@ bool RimPlotWindow::handleGlobalWheelEvent( QWheelEvent* wheelEvent )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotWindow::onMousePressEvent( QMouseEvent* mouseEvent )
|
||||
bool RimPlotWindow::handleGlobalMousePressEvent( QMouseEvent* mouseEvent )
|
||||
{
|
||||
if ( mouseEvent )
|
||||
if ( mouseEvent && viewWidget() && viewWidget()->underMouse() )
|
||||
{
|
||||
setAsActiveViewer();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -92,9 +92,7 @@ public:
|
||||
|
||||
virtual bool handleGlobalKeyEvent( QKeyEvent* keyEvent );
|
||||
virtual bool handleGlobalWheelEvent( QWheelEvent* wheelEvent );
|
||||
|
||||
public slots:
|
||||
void onMousePressEvent( QMouseEvent* event );
|
||||
virtual bool handleGlobalMousePressEvent( QMouseEvent* mouseEvent );
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
Reference in new issue
Block a user