Merge remote-tracking branch 'origin/2018.01.01-patch' into dev

This commit is contained in:
Rebecca Cox 2018-01-29 11:24:56 +01:00
commit 885c03b9a4
6 changed files with 13 additions and 16 deletions

View File

@ -77,7 +77,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
if (oilField->wellPathCollection->wellPaths().size() > 0) if (oilField->wellPathCollection->wellPaths().size() > 0)
{ {
RimWellPath* wellPath = oilField->wellPathCollection->newestAddedWellPath(); RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
if (wellPath) if (wellPath)
{ {
RiuMainWindow::instance()->selectAsCurrentItem(wellPath); RiuMainWindow::instance()->selectAsCurrentItem(wellPath);

View File

@ -70,7 +70,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
if (oilField->wellPathCollection->wellPaths().size() > 0) if (oilField->wellPathCollection->wellPaths().size() > 0)
{ {
RimWellPath* wellPath = oilField->wellPathCollection->newestAddedWellPath(); RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
if (wellPath) if (wellPath)
{ {
RiuMainWindow::instance()->selectAsCurrentItem(wellPath); RiuMainWindow::instance()->selectAsCurrentItem(wellPath);

View File

@ -180,7 +180,7 @@ caf::PdmFieldHandle* RimPlotCurve::objectToggleField()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimPlotCurve::updateCurveVisibility(bool updateParent) void RimPlotCurve::updateCurveVisibility(bool updateParentPlot)
{ {
bool isVisibleInPossibleParent = true; bool isVisibleInPossibleParent = true;
@ -199,7 +199,7 @@ void RimPlotCurve::updateCurveVisibility(bool updateParent)
m_qwtPlotCurve->detach(); m_qwtPlotCurve->detach();
} }
if (updateParent) if (updateParentPlot)
{ {
updateZoomInParentPlot(); updateZoomInParentPlot();
} }

View File

@ -92,7 +92,7 @@ public:
QString curveName() const { return m_curveName; } QString curveName() const { return m_curveName; }
void updateCurveVisibility(bool updateParent); void updateCurveVisibility(bool updateParentPlot);
void updateLegendEntryVisibilityAndPlotLegend(); void updateLegendEntryVisibilityAndPlotLegend();
void updateLegendEntryVisibilityNoPlotUpdate(); void updateLegendEntryVisibilityNoPlotUpdate();

View File

@ -101,7 +101,7 @@ RimWellPathCollection::RimWellPathCollection()
m_wellPathImporter = new RifWellPathImporter; m_wellPathImporter = new RifWellPathImporter;
m_wellPathFormationsImporter = new RifWellPathFormationsImporter; m_wellPathFormationsImporter = new RifWellPathFormationsImporter;
m_newestAddedWellPath = nullptr; m_mostRecentlyUpdatedWellPath = nullptr;
} }
@ -268,23 +268,20 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
// Let name from well path file override name from well log file // Let name from well path file override name from well log file
existingWellPath->setName(wellPath->name()); existingWellPath->setName(wellPath->name());
m_mostRecentlyUpdatedWellPath = existingWellPath;
delete wellPath; delete wellPath;
} }
else else
{ {
wellPath->wellPathColor = cvf::Color3f(interpolatedWellColors[wpIdx]); wellPath->wellPathColor = cvf::Color3f(interpolatedWellColors[wpIdx]);
wellPath->setUnitSystem(findUnitSystemForWellPath(wellPath)); wellPath->setUnitSystem(findUnitSystemForWellPath(wellPath));
m_mostRecentlyUpdatedWellPath = wellPath;
wellPaths.push_back(wellPath); wellPaths.push_back(wellPath);
} }
progress.incrementProgress(); progress.incrementProgress();
} }
if (!wellPaths.empty())
{
m_newestAddedWellPath = wellPaths[wellPaths.size() - 1];
}
this->sortWellsByName(); this->sortWellsByName();
} }
@ -360,7 +357,7 @@ void RimWellPathCollection::addWellPathFormations(const QStringList& filePaths)
QString wellFormationsCount = QString("%1").arg(it->second->formationNamesCount()); QString wellFormationsCount = QString("%1").arg(it->second->formationNamesCount());
m_newestAddedWellPath = wellPath; m_mostRecentlyUpdatedWellPath = wellPath;
outputMessage += it->first + "\t\t"; outputMessage += it->first + "\t\t";
outputMessage += wellPath->name() + " \t\t\t"; outputMessage += wellPath->name() + " \t\t\t";
@ -520,9 +517,9 @@ void RimWellPathCollection::deleteAllWellPaths()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellPath* RimWellPathCollection::newestAddedWellPath() RimWellPath* RimWellPathCollection::mostRecentlyUpdatedWellPath()
{ {
return m_newestAddedWellPath; return m_mostRecentlyUpdatedWellPath;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -93,7 +93,7 @@ public:
void removeWellPath(RimWellPath* wellPath); void removeWellPath(RimWellPath* wellPath);
void deleteAllWellPaths(); void deleteAllWellPaths();
RimWellPath* newestAddedWellPath(); RimWellPath* mostRecentlyUpdatedWellPath();
void readWellPathFormationFiles(); void readWellPathFormationFiles();
void reloadAllWellPathFormations(); void reloadAllWellPathFormations();
@ -136,5 +136,5 @@ private:
RifWellPathImporter* m_wellPathImporter; RifWellPathImporter* m_wellPathImporter;
RifWellPathFormationsImporter* m_wellPathFormationsImporter; RifWellPathFormationsImporter* m_wellPathFormationsImporter;
caf::PdmPointer<RimWellPath> m_newestAddedWellPath; caf::PdmPointer<RimWellPath> m_mostRecentlyUpdatedWellPath;
}; };