Dock system selection improvements and fixes (#14305)

* Make sure we don't trigger another select when a view in the project tree is selected.
* Fix for #14255 and related issues
* Make sure we can close and open a main window, keeping the layout when reopened.
This commit is contained in:
JJ authored and GitHub committed 2026-06-24 16:07:21 +02:00
1 parent ac97f76e97
commit 82aa009378
12 files changed
+104 -30

No files matched your search

@@ -181,7 +181,7 @@ int RimDockWindowController::mainWindowId() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimDockWindowController::setAsActiveViewer()
void RimDockWindowController::setAsActiveViewer( bool allowSelectionChange )
{
if ( getMainWindow() == nullptr ) return;
@@ -218,7 +218,7 @@ void RimDockWindowController::setAsActiveViewer()
}
else if ( viewPlot )
{
RiuPlotMainWindowTools::selectAsCurrentItem( viewPlot );
if ( allowSelectionChange ) RiuPlotMainWindowTools::selectAsCurrentItem( viewPlot );
RiuPlotMainWindowTools::refreshToolbars();
}
}
@@ -49,7 +49,7 @@ public:
void setViewToControl( RimViewWindow* view );
int mainWindowId() const;
void setAsActiveViewer();
void setAsActiveViewer( bool allowSelectionChange );
void updateViewerWidget();
void handleViewerDeletion();
@@ -88,9 +88,9 @@ void RimViewWindow::setShowWindow( bool showWindow )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimViewWindow::setAsActiveViewer()
void RimViewWindow::setAsActiveViewer( bool allowSelectionChange )
{
if ( m_windowController ) m_windowController->setAsActiveViewer();
if ( m_windowController ) m_windowController->setAsActiveViewer( allowSelectionChange );
}
//--------------------------------------------------------------------------------------------------
@@ -46,7 +46,7 @@ public:
bool showWindow() const;
void setShowWindow( bool showWindow );
void setAsActiveViewer();
void setAsActiveViewer( bool allowSelectionChange = false );
bool isActiveViewer() const;
bool isMainDockedWindow() const;