mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
PlotCurve : Remove duplicate code
This commit is contained in:
@@ -550,7 +550,7 @@ void RimPlotCurve::showLegend(bool show)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::setZOrder(double z)
|
void RimPlotCurve::setZOrder(double z)
|
||||||
{
|
{
|
||||||
@@ -561,24 +561,11 @@ void RimPlotCurve::setZOrder(double z)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
|
void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
|
||||||
{
|
{
|
||||||
if (m_showLegend()) {
|
updateLegendEntryVisibilityNoPlotUpdate();
|
||||||
if (m_curveName().isEmpty())
|
|
||||||
{
|
|
||||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_parentQwtPlot != nullptr)
|
if (m_parentQwtPlot != nullptr)
|
||||||
{
|
{
|
||||||
@@ -587,11 +574,12 @@ void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
||||||
{
|
{
|
||||||
if (m_showLegend()) {
|
if (m_showLegend())
|
||||||
|
{
|
||||||
if (m_curveName().isEmpty())
|
if (m_curveName().isEmpty())
|
||||||
{
|
{
|
||||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||||
@@ -605,4 +593,4 @@ void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
|||||||
{
|
{
|
||||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user