Early return if the active view is the same as the activated view

This will make sure that selection in the project tree is stable for focus in events.
This commit is contained in:
Magne Sjaastad 2023-11-17 15:18:57 +01:00
parent 98ce0dc226
commit f44df76089

View File

@ -1320,7 +1320,8 @@ void RiuMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
Rim3dView* previousActiveReservoirView = RiaApplication::instance()->activeReservoirView();
Rim3dView* activatedView = dynamic_cast<Rim3dView*>( findViewWindowFromSubWindow( subWindow ) );
if ( !activatedView ) return;
if ( !activatedView || ( previousActiveReservoirView == activatedView ) ) return;
RiaApplication::instance()->setActiveReservoirView( activatedView );
if ( !isBlockingViewSelectionOnSubWindowActivated() )