mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added mesh color as preference, and resetting of preferences before doing regression tests
p4#: 21263
This commit is contained in:
@@ -1278,6 +1278,7 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
|
||||
imageCompareReporter.generateHTMLReport(testDir.filePath(RegTestNames::reportFileName).toStdString());
|
||||
|
||||
// Generate diff images
|
||||
this->preferences()->resetToDefaults();
|
||||
|
||||
for (int dirIdx = 0; dirIdx < folderList.size(); ++dirIdx)
|
||||
{
|
||||
|
||||
@@ -38,6 +38,9 @@ RiaPreferences::RiaPreferences(void)
|
||||
octaveExecutable.setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
|
||||
|
||||
CAF_PDM_InitField(&defaultGridLines, "defaultGridLines", true, "Gridlines", "", "", "");
|
||||
CAF_PDM_InitField(&defaultGridLineColors, "defaultGridLineColors", cvf::Color3f(0.92f, 0.92f, 0.92f), "Mesh color", "", "", "");
|
||||
CAF_PDM_InitField(&defaultFaultGridLineColors, "defaultFaultGridLineColors", cvf::Color3f(0.08f, 0.08f, 0.08f), "Mesh color along faults", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&defaultScaleFactorZ, "defaultScaleFactorZ", 5, "Z scale factor", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&useShaders, "useShaders", true, "Use Shaders", "", "", "");
|
||||
@@ -88,9 +91,26 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* defaultSettingsGroup = uiOrdering.addNewGroup("Default settings");
|
||||
defaultSettingsGroup->add(&defaultScaleFactorZ);
|
||||
defaultSettingsGroup->add(&defaultGridLines);
|
||||
defaultSettingsGroup->add(&defaultGridLineColors);
|
||||
defaultSettingsGroup->add(&defaultFaultGridLineColors);
|
||||
|
||||
|
||||
caf::PdmUiGroup* autoComputeGroup = uiOrdering.addNewGroup("Compute when loading new case");
|
||||
autoComputeGroup->add(&autocomputeSOIL);
|
||||
autoComputeGroup->add(&autocomputeDepthRelatedProperties);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferences::resetToDefaults()
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
this->fields(fields);
|
||||
|
||||
for (size_t i = 0; i < fields.size(); ++i)
|
||||
{
|
||||
fields[i]->resetToDefaultValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ public:
|
||||
RiaPreferences(void);
|
||||
virtual ~RiaPreferences(void);
|
||||
|
||||
void resetToDefaults();
|
||||
|
||||
public: // Pdm Fields
|
||||
caf::PdmField<caf::AppEnum< RiaApplication::RINavigationPolicy > > navigationPolicy;
|
||||
|
||||
@@ -38,6 +40,8 @@ public: // Pdm Fields
|
||||
|
||||
caf::PdmField<int> defaultScaleFactorZ;
|
||||
caf::PdmField<bool> defaultGridLines;
|
||||
caf::PdmField<cvf::Color3f> defaultGridLineColors;
|
||||
caf::PdmField<cvf::Color3f> defaultFaultGridLineColors;
|
||||
|
||||
caf::PdmField<bool> useShaders;
|
||||
caf::PdmField<bool> showHud;
|
||||
|
||||
Reference in New Issue
Block a user