2016-12-20 15:28:37 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2017-01-02 14:01:31 +01:00
|
|
|
#include "RicNewWellPathFractureAtPosFeature.h"
|
2016-12-20 15:28:37 +01:00
|
|
|
|
|
|
|
|
#include "RiaApplication.h"
|
|
|
|
|
|
2017-06-09 13:05:32 +02:00
|
|
|
#include "RicNewWellPathFractureFeature.h"
|
2017-01-02 11:59:30 +01:00
|
|
|
|
|
|
|
|
#include "RiuSelectionManager.h"
|
|
|
|
|
|
2017-01-02 10:10:45 +01:00
|
|
|
#include <QAction>
|
2016-12-21 13:40:53 +01:00
|
|
|
|
2016-12-20 15:28:37 +01:00
|
|
|
|
|
|
|
|
|
2017-01-02 14:01:31 +01:00
|
|
|
CAF_CMD_SOURCE_INIT(RicNewWellPathFractureAtPosFeature, "RicNewWellPathFractureAtPosFeature");
|
2016-12-20 15:28:37 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 14:01:31 +01:00
|
|
|
void RicNewWellPathFractureAtPosFeature::onActionTriggered(bool isChecked)
|
2016-12-20 15:28:37 +01:00
|
|
|
{
|
2016-12-21 13:40:53 +01:00
|
|
|
RiuSelectionManager* riuSelManager = RiuSelectionManager::instance();
|
|
|
|
|
RiuSelectionItem* selItem = riuSelManager->selectedItem(RiuSelectionManager::RUI_TEMPORARY);
|
2016-12-20 15:28:37 +01:00
|
|
|
|
2017-06-09 13:05:32 +02:00
|
|
|
RiuWellPathSelectionItem* wellPathItem = dynamic_cast<RiuWellPathSelectionItem*>(selItem);
|
|
|
|
|
if (!wellPathItem) return;
|
2016-12-20 15:28:37 +01:00
|
|
|
|
2017-01-04 09:08:10 +01:00
|
|
|
RimWellPath* wellPath = wellPathItem->m_wellpath;
|
2017-06-09 13:05:32 +02:00
|
|
|
if (!wellPath) return;
|
2017-01-05 14:52:59 +01:00
|
|
|
|
2017-06-09 13:05:32 +02:00
|
|
|
RicNewWellPathFractureFeature::addFracture(wellPath, wellPathItem->m_measuredDepth);
|
2016-12-20 15:28:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 14:01:31 +01:00
|
|
|
void RicNewWellPathFractureAtPosFeature::setupActionLook(QAction* actionToSetup)
|
2016-12-20 15:28:37 +01:00
|
|
|
{
|
2017-01-05 14:57:04 +01:00
|
|
|
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
2016-12-20 15:28:37 +01:00
|
|
|
actionToSetup->setText("New Fracture");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 14:01:31 +01:00
|
|
|
bool RicNewWellPathFractureAtPosFeature::isCommandEnabled()
|
2016-12-20 15:28:37 +01:00
|
|
|
{
|
2017-06-09 13:05:32 +02:00
|
|
|
return true;
|
2016-12-20 15:28:37 +01:00
|
|
|
}
|