mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3255 Replace code that duplicates functionality in caf::SelectionManager
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
#include <QAction>
|
||||
#include <QString>
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -48,7 +50,7 @@ CAF_CMD_SOURCE_INIT(RicNewWellLogRftCurveFeature, "RicNewWellLogRftCurveFeature"
|
||||
bool RicNewWellLogRftCurveFeature::isCommandEnabled()
|
||||
{
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()) return false;
|
||||
if (RicWellLogTools::selectedWellLogPlotTrack() != nullptr)
|
||||
if (caf::SelectionManager::instance()->selectedItemOfType<RimWellLogTrack>() != nullptr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -69,7 +71,7 @@ bool RicNewWellLogRftCurveFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellLogRftCurveFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimWellLogTrack* wellLogPlotTrack = RicWellLogTools::selectedWellLogPlotTrack();
|
||||
RimWellLogTrack* wellLogPlotTrack = caf::SelectionManager::instance()->selectedItemOfType<RimWellLogTrack>();
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
int branchIdx;
|
||||
|
||||
Reference in New Issue
Block a user