mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#3898, #3899, #3900 Better source stepping command icons. Combine curve and stepping icons. Improved Clear source curve command enabling
This commit is contained in:
1 parent
db78e07fcf
commit
07f8221676
10 files changed
+59
-9
No files matched your search
+21
-2
@@ -37,7 +37,26 @@ CAF_CMD_SOURCE_INIT(RicClearSourceSteppingEnsembleCurveSetFeature, "RicClearSour
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicClearSourceSteppingEnsembleCurveSetFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
std::vector<caf::PdmObject*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
if (objects.size() == 1)
|
||||
{
|
||||
auto c = objects[0];
|
||||
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
c->firstAncestorOrThisOfTypeAsserted(summaryPlot);
|
||||
if (summaryPlot)
|
||||
{
|
||||
if (summaryPlot->ensembleCurveSetCollection()->curveSetForSourceStepping()
|
||||
|| summaryPlot->summaryCurveCollection()->curveForSourceStepping())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -91,5 +110,5 @@ void RicClearSourceSteppingEnsembleCurveSetFeature::clearAllSourceSteppingInSumm
|
||||
void RicClearSourceSteppingEnsembleCurveSetFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Clear Source Stepping Curve Set");
|
||||
actionToSetup->setIcon(QIcon(":/updownarrow.png"));
|
||||
actionToSetup->setIcon(QIcon(":/StepUpDown16x16.png"));
|
||||
}
|
||||
Reference in new issue
Block a user