#6266 Fix unwanted selection change when changing window focus

This commit is contained in:
Gaute Lindkvist
2020-08-05 13:03:52 +02:00
parent 105deba056
commit 31246b59f3
2 changed files with 43 additions and 4 deletions

View File

@@ -759,11 +759,14 @@ void RiuPlotMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
caf::PdmObject* pdmObject = dynamic_cast<caf::PdmObject*>( uiItem );
if ( pdmObject )
{
RimViewWindow* owningView = nullptr;
pdmObject->firstAncestorOrThisOfType( owningView );
if ( owningView && owningView == activatedView )
std::vector<RimViewWindow*> ancestralViews;
pdmObject->allAncestorsOrThisOfType( ancestralViews );
for ( auto ancestralView : ancestralViews )
{
childSelected = true;
if ( ancestralView == activatedView )
{
childSelected = true;
}
}
}
}