#4240 Project Tree : Keep selection when clicking on cells

When current selection in project tree is part of a 3D view, update the selection accordingly. If an item unrelated to 3D view is selected, do nothing when clicking in the 3D view.
This commit is contained in:
Magne Sjaastad 2019-03-29 11:23:46 +01:00
parent 0f636fcc81
commit b26c61b7bf

View File

@ -1240,6 +1240,12 @@ void RiuMainWindow::slotSubWindowActivated(QMdiSubWindow* subWindow)
RimProject* proj = RiaApplication::instance()->project();
if (!proj) return;
if (!caf::SelectionManager::instance()->selectedItemAncestorOfType<Rim3dView>())
{
// Do not try to manipulate the tree selection if no object part of a 3D view is currently selected
return;
}
// Find the activated 3D view
Rim3dView* activatedView = nullptr;