mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6285 Add context menu stacking/unstacking of curves
This commit is contained in:
@@ -665,6 +665,9 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder << "RicSetSourceSteppingSummaryCurveFeature";
|
||||
menuBuilder << "RicClearSourceSteppingSummaryCurveFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicStackSelectedCurvesFeature";
|
||||
menuBuilder << "RicUnstackSelectedCurvesFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicCopyReferencesToClipboardFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicEditSummaryCurveCalculationFeature";
|
||||
@@ -969,6 +972,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder << "RicConvertGroupToEnsembleFeature";
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder << "RicStackSelectedCurvesFeature";
|
||||
menuBuilder << "RicUnstackSelectedCurvesFeature";
|
||||
menuBuilder.addSeparator();
|
||||
|
||||
menuBuilder << "RicFlyToObjectFeature";
|
||||
|
||||
|
||||
@@ -740,6 +740,22 @@ bool RimPlotCurve::isStackedWithPhaseColors() const
|
||||
return m_isStackedWithPhaseColors;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setIsStacked( bool stacked )
|
||||
{
|
||||
m_isStacked = stacked;
|
||||
|
||||
if ( !m_isStacked() && m_fillStyle() != Qt::NoBrush )
|
||||
{
|
||||
// Switch off area fill when turning off stacking.
|
||||
m_fillStyle = Qt::NoBrush;
|
||||
}
|
||||
|
||||
stackingChanged.send( m_isStacked() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -125,6 +125,7 @@ public:
|
||||
void assignStackColor( size_t index, size_t count );
|
||||
bool isStacked() const;
|
||||
bool isStackedWithPhaseColors() const;
|
||||
void setIsStacked( bool stacked );
|
||||
|
||||
protected:
|
||||
virtual QString createCurveAutoName() = 0;
|
||||
|
||||
@@ -1370,10 +1370,10 @@ void RimSummaryPlot::childFieldChangedByUi( const caf::PdmFieldHandle* changedCh
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::updateStackedCurveData()
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
|
||||
updateStackedCurveDataForAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
|
||||
updateStackedCurveDataForAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
|
||||
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user