mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#80) Refactored navigation mode related code
Made sure that navigation policies are created only one place, in the new member function RiuViewer::updateNavigationPolicy().
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafCeetronPlusNavigation.h"
|
||||
#include "RiuCadNavigation.h"
|
||||
#include "RiuRmsNavigation.h"
|
||||
#include "RiuGeoQuestNavigation.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
@@ -457,3 +462,32 @@ void RiuViewer::addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend)
|
||||
m_visibleLegends.push_back(legend);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::updateNavigationPolicy()
|
||||
{
|
||||
switch (RiaApplication::instance()->navigationPolicy())
|
||||
{
|
||||
case RiaApplication::NAVIGATION_POLICY_CAD:
|
||||
setNavigationPolicy(new RiuCadNavigation);
|
||||
break;
|
||||
|
||||
case RiaApplication::NAVIGATION_POLICY_CEETRON:
|
||||
setNavigationPolicy(new caf::CeetronPlusNavigation);
|
||||
break;
|
||||
|
||||
case RiaApplication::NAVIGATION_POLICY_GEOQUEST:
|
||||
setNavigationPolicy(new RiuGeoQuestNavigation);
|
||||
break;
|
||||
|
||||
case RiaApplication::NAVIGATION_POLICY_RMS:
|
||||
setNavigationPolicy(new RiuRmsNavigation);
|
||||
break;
|
||||
|
||||
default:
|
||||
CVF_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user