Skip to content

Commit

Permalink
Add [BETA] as postfix to user interface
Browse files Browse the repository at this point in the history
Add postfix to SUMO and OSDU cloud import features.
  • Loading branch information
magnesj committed Aug 26, 2024
1 parent 6189383 commit f3183c6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ApplicationLibCode/Application/RiaDefines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,11 @@ std::vector<double> RiaDefines::viewScaleOptions()
{
return { 0.005, 0.01, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 50.0 };
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::betaFeaturePostfix()
{
return " [BETA]";
}
2 changes: 2 additions & 0 deletions ApplicationLibCode/Application/RiaDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ enum class ItemIn3dView
ALL = 0b00000011
};

QString betaFeaturePostfix();

}; // namespace RiaDefines

// Activate bit mask operators at global scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "Cloud/RiaOsduConnector.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
#include "RiaDefines.h"
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
Expand Down Expand Up @@ -82,7 +83,7 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
caf::ProgressInfo progress( importedWells.size(), "Importing wells from OSDU", false, true );
int colorIndex = 0;
std::vector<RimOsduWellPath*> newWells;
for ( auto w : importedWells )
for ( const auto& w : importedWells )
{
auto wellPath = new RimOsduWellPath;
wellPath->setName( w.name );
Expand Down Expand Up @@ -118,6 +119,6 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicWellPathsImportOsduFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Import Well Paths from &OSDU" );
actionToSetup->setText( "Import Well Paths from &OSDU" + RiaDefines::betaFeaturePostfix() );
actionToSetup->setIcon( QIcon( ":/WellCollection.png" ) );
}
3 changes: 2 additions & 1 deletion ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "RicImportWellLogOsduFeature.h"

#include "Cloud/RiaOsduConnector.h"
#include "RiaDefines.h"
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
Expand Down Expand Up @@ -118,5 +119,5 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
void RicImportWellLogOsduFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/LasFile16x16.png" ) );
actionToSetup->setText( "Import Well Log From OSDU" );
actionToSetup->setText( "Import Well Log From OSDU" + RiaDefines::betaFeaturePostfix() );
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "RicCreateSumoEnsembleFeature.h"

#include "RiaDefines.h"
#include "RiaSummaryTools.h"

#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
Expand Down Expand Up @@ -57,6 +58,6 @@ void RicCreateSumoEnsembleFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicCreateSumoEnsembleFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Create Sumo Ensemble" );
actionToSetup->setText( "Create Sumo Ensemble" + RiaDefines::betaFeaturePostfix() );
actionToSetup->setIcon( QIcon( ":/SummaryEnsemble.svg" ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,12 @@ int RimContextCommandBuilder::appendImportMenu( caf::CmdFeatureMenuBuilder& menu
candidates << "RicImportWellLogCsvFileFeature";
candidates << "RicReloadWellPathFormationNamesFeature";

if ( addOsduImportMenuItem ) candidates << "RicImportWellLogOsduFeature";
// 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() )
{
candidates << "RicImportWellLogOsduFeature";
}

return appendSubMenuWithCommands( menuBuilder, candidates, "Import", QIcon(), addSeparatorBeforeMenu );
}
Expand Down

0 comments on commit f3183c6

Please sign in to comment.