#2487 Avoid switching view when clicking objs in the intersectino view. Some minor refactoring of the MainWindows

This commit is contained in:
Jacob Støren
2018-02-27 11:23:43 +01:00
parent 599909a9e8
commit 6a3b43ec7c
7 changed files with 60 additions and 55 deletions

View File

@@ -571,11 +571,9 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM
intersectionHit = true;
intersectionTriangleHit = crossSectionSourceInfo->triangle(firstPartTriangleIndex);
if (!dynamic_cast<Rim2dIntersectionView*>(m_viewer->ownerViewWindow()))
{
RiuMainWindow::instance()->selectAsCurrentItem(crossSectionSourceInfo->crossSection());
}
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>(m_viewer->ownerViewWindow()) == nullptr;
RiuMainWindow::instance()->selectAsCurrentItem(crossSectionSourceInfo->crossSection(), allowActiveViewChange);
}
else if (intersectionBoxSourceInfo)
{