mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Stop reselecting on activation in plot view if a child is already selected
This commit is contained in:
@@ -644,9 +644,28 @@ void RiuPlotMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
|
|||||||
m_activePlotViewWindow = activatedView;
|
m_activePlotViewWindow = activatedView;
|
||||||
|
|
||||||
if ( !blockSubWindowProjectTreeSelection() )
|
if ( !blockSubWindowProjectTreeSelection() )
|
||||||
|
{
|
||||||
|
std::vector<caf::PdmUiItem*> currentSelection;
|
||||||
|
m_projectTreeView->selectedUiItems( currentSelection );
|
||||||
|
bool childSelected = false;
|
||||||
|
for ( caf::PdmUiItem* uiItem : currentSelection )
|
||||||
|
{
|
||||||
|
caf::PdmObject* pdmObject = dynamic_cast<caf::PdmObject*>( uiItem );
|
||||||
|
if ( pdmObject )
|
||||||
|
{
|
||||||
|
RimViewWindow* owningView = nullptr;
|
||||||
|
pdmObject->firstAncestorOrThisOfType( owningView );
|
||||||
|
if ( owningView && owningView == activatedView )
|
||||||
|
{
|
||||||
|
childSelected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( !childSelected )
|
||||||
{
|
{
|
||||||
selectAsCurrentItem( activatedView );
|
selectAsCurrentItem( activatedView );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateWellLogPlotToolBar();
|
updateWellLogPlotToolBar();
|
||||||
updateSummaryPlotToolBar();
|
updateSummaryPlotToolBar();
|
||||||
|
|||||||
Reference in New Issue
Block a user