#3842 : Update icons in project tree

This commit is contained in:
Magne Sjaastad
2018-12-17 16:01:15 +01:00
parent 9af5adf066
commit fb9e5ee210
3 changed files with 39 additions and 0 deletions

View File

@@ -660,6 +660,20 @@ void RimEnsembleCurveSet::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrd
} }
uiTreeOrdering.skipRemainingChildren(true); uiTreeOrdering.skipRemainingChildren(true);
// Reset dynamic icon
this->setUiIcon(QIcon());
// Get static one
QIcon icon = this->uiIcon();
RimEnsembleCurveSetCollection* coll = nullptr;
this->firstAncestorOrThisOfType(coll);
if (coll && coll->curveSetForSourceStepping() == this)
{
icon = QIcon(":/updownarrow.png");
}
this->setUiIcon(icon);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -565,6 +565,28 @@ void RimSummaryCurve::updateLegendsInPlot()
plot->updateAllLegendItems(); plot->updateAllLegendItems();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCurve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
RimPlotCurve::defineUiTreeOrdering(uiTreeOrdering, uiConfigName);
// Reset dynamic icon
this->setUiIcon(QIcon());
// Get static one
QIcon icon = this->uiIcon();
RimSummaryCurveCollection* coll = nullptr;
this->firstAncestorOrThisOfType(coll);
if (coll && coll->curveForSourceStepping() == this)
{
icon = QIcon(":/updownarrow.png");
}
this->setUiIcon(icon);
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -93,6 +93,9 @@ protected:
void updateLegendsInPlot() override; void updateLegendsInPlot() override;
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
private: private:
RifSummaryReaderInterface* valuesSummaryReaderX() const; RifSummaryReaderInterface* valuesSummaryReaderX() const;
RifSummaryReaderInterface* valuesSummaryReaderY() const; RifSummaryReaderInterface* valuesSummaryReaderY() const;