mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6266 Fix unwanted selection change when changing window focus
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user