Minor updates

This commit is contained in:
jonjenssen authored and JJ committed 2026-06-17 13:55:32 +02:00
1 parent 3b4a732cb5
commit 9b93e4addc
2 files changed
+3 -13

No files matched your search

@@ -1476,7 +1476,7 @@ void RiuMainWindow::selectedObjectsChanged()
if ( selectedReservoirView )
{
// Set focus in MDI area to this window if it exists
// Set focus in dock area to this window if it exists
if ( selectedReservoirView->viewer() && selectedReservoirView->viewer()->ownerViewWindow() )
{
setBlockViewSelectionOnSubWindowActivated( true );
@@ -896,7 +896,7 @@ void RiuPlotMainWindow::selectedObjectsChanged( caf::PdmUiTreeView* projectTree,
if ( uiItems.size() == 1 && m_allowActiveViewChangeFromSelection )
{
// Find the reservoir view or the Plot that the selected item is within
// Find the plot view that the selected item is within
if ( !firstSelectedObject )
{
caf::PdmFieldHandle* selectedField = dynamic_cast<caf::PdmFieldHandle*>( uiItems.front() );
@@ -911,16 +911,6 @@ void RiuPlotMainWindow::selectedObjectsChanged( caf::PdmUiTreeView* projectTree,
selectedWindow = firstSelectedObject->firstAncestorOrThisOfType<RimViewWindow>();
}
// If we can't find the view window as an MDI sub window, we search higher in the
// project tree to find a possible parent view window that has.
// if ( selectedWindow && !findMdiSubWindow( selectedWindow->viewWidget() ) )
//{
// if ( selectedWindow->parentField() && selectedWindow->parentField()->ownerObject() )
// {
// selectedWindow = selectedWindow->parentField()->ownerObject()->firstAncestorOrThisOfType<RimViewWindow>();
// }
//}
if ( selectedWindow )
{
if ( selectedWindow->viewWidget() )
@@ -948,7 +938,7 @@ void RiuPlotMainWindow::selectedObjectsChanged( caf::PdmUiTreeView* projectTree,
}
// The only way to get to this code is by selection change initiated from the project tree view
// As we are activating an MDI-window, the focus is given to this MDI-window
// As we are activating an view window, the focus might be given to this window
// Set focus back to the tree view to be able to continue keyboard tree view navigation
projectTree->treeView()->setFocus();
}