#2333 New Intersection View: Update vertical warningtext. Avoid selecting view in tree.

This commit is contained in:
Jacob Støren 2018-01-26 08:40:47 +01:00
parent 02f6b95959
commit d8d2076dea

View File

@ -30,6 +30,9 @@
#include <QAction> #include <QAction>
#include <QMessageBox> #include <QMessageBox>
#include "RiuViewer.h"
#include "cvfCamera.h"
CAF_CMD_SOURCE_INIT(RicNewIntersectionViewFeature, "RicNewIntersectionViewFeature"); CAF_CMD_SOURCE_INIT(RicNewIntersectionViewFeature, "RicNewIntersectionViewFeature");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -61,8 +64,8 @@ void RicNewIntersectionViewFeature::onActionTriggered(bool isChecked)
{ {
if (intersection->direction() != RimIntersection::CS_VERTICAL) if (intersection->direction() != RimIntersection::CS_VERTICAL)
{ {
QString text = QString("Intersection '%1' is not a vertical intersection. The intersection view supports" QString text = QString("The intersection view only supports vertical intersections.\n"
"only vertical intersections.").arg(intersection->name()); "The intersection '%1' is not vertical but a converted version will be shown in the view .").arg(intersection->name());
QMessageBox::warning(RiuMainWindow::instance(), "New Intersection View", text); QMessageBox::warning(RiuMainWindow::instance(), "New Intersection View", text);
} }
@ -79,7 +82,7 @@ void RicNewIntersectionViewFeature::onActionTriggered(bool isChecked)
if (objectToSelect) if (objectToSelect)
{ {
RiuMainWindow::instance()->selectAsCurrentItem(objectToSelect); //RiuMainWindow::instance()->selectAsCurrentItem(objectToSelect);
} }
} }