mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-25 07:08:45 -06:00
Move OSDU well logs and undo/redo view to experimental features
Gate the OSDU well log import menu item and the command undo/redo history view behind the discoverable experimental features registry instead of RiaApplication::enableDevelopmentFeatures(), so they can be toggled from Preferences -> System without setting the RESINSIGHT_DEVEL environment variable. Register the 'osdu-well-logs' and 'undo-redo-view' features in RiaExperimentalFeatures and gate the code paths via RiaPreferencesSystem::isFeatureEnabled().
This commit is contained in:
1 parent
5434873984
commit
a0e502f75e
3 files changed
+9
-4
No files matched your search
@@ -29,7 +29,10 @@ const std::vector<RiaExperimentalFeatures::Feature>& RiaExperimentalFeatures::av
|
||||
//
|
||||
// Example:
|
||||
// { "my-feature", "My Feature", "Short description of what it does." },
|
||||
static const std::vector<Feature> features = {};
|
||||
static const std::vector<Feature> features = {
|
||||
{ "osdu-well-logs", "OSDU Well Logs", "Enable import of well logs from OSDU." },
|
||||
{ "undo-redo-view", "Undo/Redo View", "Show the command undo/redo history view." },
|
||||
};
|
||||
|
||||
return features;
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "QuickAccess/RimFieldQuickAccess.h"
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
|
||||
#include "ContourMap/RimEclipseContourMapViewCollection.h"
|
||||
#include "Formations/RimFormationNames.h"
|
||||
@@ -1408,8 +1409,8 @@ int RimContextCommandBuilder::appendImportMenu( caf::CmdFeatureMenuBuilder& menu
|
||||
candidates << "RicReloadWellPathFormationNamesFeature";
|
||||
|
||||
// Import of well logs from OSDU is disabled by default. The quality of well log data from OSDU is not sufficient for effective
|
||||
// use. The environment variable RESINSIGHT_DEVEL must be set to enable this feature.
|
||||
if ( addOsduImportMenuItem && RiaApplication::enableDevelopmentFeatures() )
|
||||
// use. Enable the "OSDU Well Logs" experimental feature (Preferences -> System) to enable this menu item.
|
||||
if ( addOsduImportMenuItem && RiaPreferencesSystem::current()->isFeatureEnabled( "osdu-well-logs" ) )
|
||||
{
|
||||
candidates << "RicImportWellLogOsduFeature";
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
@@ -71,7 +72,7 @@ RiuMainWindowBase::RiuMainWindowBase()
|
||||
m_dockManager = new ads::CDockManager( this );
|
||||
m_dockManager->setStyleSheet( "" );
|
||||
|
||||
if ( RiaPreferences::current()->useUndoRedo() && RiaApplication::enableDevelopmentFeatures() )
|
||||
if ( RiaPreferences::current()->useUndoRedo() && RiaPreferencesSystem::current()->isFeatureEnabled( "undo-redo-view" ) )
|
||||
{
|
||||
m_undoView = new QUndoView( this );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user