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:
@@ -44,10 +44,6 @@
|
||||
#include "RimFaultCollection.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
|
||||
#include "cafCeetronNavigation.h"
|
||||
#include "RiuCadNavigation.h"
|
||||
#include "RiuRmsNavigation.h"
|
||||
#include "RiuGeoQuestNavigation.h"
|
||||
#include "RiaSocketServer.h"
|
||||
#include "cafUiProcess.h"
|
||||
//
|
||||
@@ -1381,27 +1377,7 @@ void RiaApplication::applyPreferences()
|
||||
{
|
||||
if (m_activeReservoirView && m_activeReservoirView->viewer())
|
||||
{
|
||||
if (m_preferences->navigationPolicy() == NAVIGATION_POLICY_CAD)
|
||||
{
|
||||
m_activeReservoirView->viewer()->setNavigationPolicy(new RiuCadNavigation);
|
||||
}
|
||||
else if (m_preferences->navigationPolicy() == NAVIGATION_POLICY_CEETRON)
|
||||
{
|
||||
m_activeReservoirView->viewer()->setNavigationPolicy(new caf::CeetronPlusNavigation);
|
||||
}
|
||||
else if (m_preferences->navigationPolicy() == NAVIGATION_POLICY_GEOQUEST)
|
||||
{
|
||||
m_activeReservoirView->viewer()->setNavigationPolicy(new RiuGeoQuestNavigation);
|
||||
}
|
||||
else if (m_preferences->navigationPolicy() == NAVIGATION_POLICY_RMS)
|
||||
{
|
||||
m_activeReservoirView->viewer()->setNavigationPolicy(new RiuRmsNavigation);
|
||||
}
|
||||
else
|
||||
{
|
||||
CVF_ASSERT(0);
|
||||
}
|
||||
|
||||
m_activeReservoirView->viewer()->updateNavigationPolicy();
|
||||
m_activeReservoirView->viewer()->enablePerfInfoHud(m_preferences->showHud());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user