diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicAppendCrossSectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicAppendCrossSectionFeature.cpp index 618e21092f..53e57f1156 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicAppendCrossSectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicAppendCrossSectionFeature.cpp @@ -44,12 +44,16 @@ bool RicAppendCrossSectionFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicAppendCrossSectionFeature::onActionTriggered(bool isChecked) { - std::vector collection; + std::vector collection; caf::SelectionManager::instance()->objectsByType(&collection); - CVF_ASSERT(collection.size() == 1); - RicAppendCrossSectionFeatureCmd* cmd = new RicAppendCrossSectionFeatureCmd(collection[0]); + RimCrossSectionCollection* crossSectionCollection = NULL; + collection[0]->firstAnchestorOrThisOfType(crossSectionCollection); + + CVF_ASSERT(crossSectionCollection); + + RicAppendCrossSectionFeatureCmd* cmd = new RicAppendCrossSectionFeatureCmd(crossSectionCollection); caf::CmdExecCommandManager::instance()->processExecuteCommand(cmd); } @@ -58,7 +62,7 @@ void RicAppendCrossSectionFeature::onActionTriggered(bool isChecked) //-------------------------------------------------------------------------------------------------- void RicAppendCrossSectionFeature::setupActionLook(QAction* actionToSetup) { -// actionToSetup->setIcon(QIcon(":/CellFilter_Values.png")); + actionToSetup->setIcon(QIcon(":/CrossSection16x16.png")); actionToSetup->setText("New Intersection"); } diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathCrossSectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathCrossSectionFeature.cpp index 662d55969b..5e7362fce5 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathCrossSectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathCrossSectionFeature.cpp @@ -74,7 +74,7 @@ void RicNewWellPathCrossSectionFeature::onActionTriggered(bool isChecked) //-------------------------------------------------------------------------------------------------- void RicNewWellPathCrossSectionFeature::setupActionLook(QAction* actionToSetup) { -// actionToSetup->setIcon(QIcon(":/CellFilter_Values.png")); + actionToSetup->setIcon(QIcon(":/CrossSection16x16.png")); actionToSetup->setText("New Intersection"); }