From 2a0f1e2fe974579fa4570797d162c2ca1c598949 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 29 Nov 2017 16:23:57 +0100 Subject: [PATCH] #2187 Summary Plot : Use prev/next buttons for plot source stepping --- .../Summary/RimSummaryPlotSourceStepping.cpp | 16 +++++++++++++++- .../Summary/RimSummaryPlotSourceStepping.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp index f7edfd06eb..f0c184373c 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.cpp @@ -32,6 +32,7 @@ #include "RimSummaryCurveCollection.h" #include "RimSummaryPlot.h" +#include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiItem.h" #include "cafPdmUiListEditor.h" @@ -160,7 +161,7 @@ void RimSummaryPlotSourceStepping::applyPreviousIdentifier() } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- std::vector RimSummaryPlotSourceStepping::fieldsToShowInToolbar() { @@ -550,3 +551,16 @@ caf::PdmValueField* RimSummaryPlotSourceStepping::valueFieldToModify() return dynamic_cast(fieldToModify()); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimSummaryPlotSourceStepping::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, + caf::PdmUiEditorAttribute* attribute) +{ + caf::PdmUiComboBoxEditorAttribute* myAttr = dynamic_cast(attribute); + if (myAttr) + { + myAttr->showPreviousAndNextButtons = true; + } +} diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h index 5bcfa8370a..adb779e9ec 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotSourceStepping.h @@ -52,6 +52,8 @@ private: virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; + virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override; + private: RifSummaryReaderInterface* summaryReader() const; RimSummaryCase* singleSummaryCase() const;