2016-12-20 08:28:37 -06: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 07:01:31 -06:00
|
|
|
#include "RicNewWellPathFractureAtPosFeature.h"
|
2016-12-20 08:28:37 -06:00
|
|
|
|
|
|
|
#include "RiaApplication.h"
|
|
|
|
|
2017-06-09 06:05:32 -05:00
|
|
|
#include "RicNewWellPathFractureFeature.h"
|
2017-01-02 04:59:30 -06:00
|
|
|
|
|
|
|
#include "RiuSelectionManager.h"
|
|
|
|
|
2017-01-02 03:10:45 -06:00
|
|
|
#include <QAction>
|
2016-12-21 06:40:53 -06:00
|
|
|
|
2016-12-20 08:28:37 -06:00
|
|
|
|
|
|
|
|
2017-01-02 07:01:31 -06:00
|
|
|
CAF_CMD_SOURCE_INIT(RicNewWellPathFractureAtPosFeature, "RicNewWellPathFractureAtPosFeature");
|
2016-12-20 08:28:37 -06:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 07:01:31 -06:00
|
|
|
void RicNewWellPathFractureAtPosFeature::onActionTriggered(bool isChecked)
|
2016-12-20 08:28:37 -06:00
|
|
|
{
|
2016-12-21 06:40:53 -06:00
|
|
|
RiuSelectionManager* riuSelManager = RiuSelectionManager::instance();
|
|
|
|
RiuSelectionItem* selItem = riuSelManager->selectedItem(RiuSelectionManager::RUI_TEMPORARY);
|
2016-12-20 08:28:37 -06:00
|
|
|
|
2017-06-09 06:05:32 -05:00
|
|
|
RiuWellPathSelectionItem* wellPathItem = dynamic_cast<RiuWellPathSelectionItem*>(selItem);
|
|
|
|
if (!wellPathItem) return;
|
2016-12-20 08:28:37 -06:00
|
|
|
|
2017-01-04 02:08:10 -06:00
|
|
|
RimWellPath* wellPath = wellPathItem->m_wellpath;
|
2017-06-09 06:05:32 -05:00
|
|
|
if (!wellPath) return;
|
2017-01-05 07:52:59 -06:00
|
|
|
|
2017-06-09 06:05:32 -05:00
|
|
|
RicNewWellPathFractureFeature::addFracture(wellPath, wellPathItem->m_measuredDepth);
|
2016-12-20 08:28:37 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 07:01:31 -06:00
|
|
|
void RicNewWellPathFractureAtPosFeature::setupActionLook(QAction* actionToSetup)
|
2016-12-20 08:28:37 -06:00
|
|
|
{
|
2017-01-05 07:57:04 -06:00
|
|
|
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
2016-12-20 08:28:37 -06:00
|
|
|
actionToSetup->setText("New Fracture");
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-01-02 07:01:31 -06:00
|
|
|
bool RicNewWellPathFractureAtPosFeature::isCommandEnabled()
|
2016-12-20 08:28:37 -06:00
|
|
|
{
|
2017-06-09 06:05:32 -05:00
|
|
|
return true;
|
2016-12-20 08:28:37 -06:00
|
|
|
}
|