mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5389 Delete empty measurement curves after deleting or changing measurements.
This commit is contained in:
@@ -54,7 +54,7 @@ void RicDeleteWellMeasurementFilePathFeature::onActionTriggered( bool isChecked
|
||||
|
||||
wellMeasurementCollection->removeMeasurementsForFilePath( filePath );
|
||||
wellMeasurementCollection->removeFilePath( filePath );
|
||||
|
||||
wellMeasurementCollection->deleteAllEmptyCurves();
|
||||
wellMeasurementCollection->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ void RicReloadWellMeasurementsFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RicWellMeasurementImportTools::removeWellMeasurementsFromFiles( filePaths );
|
||||
RicWellMeasurementImportTools::importWellMeasurementsFromFiles( filePaths );
|
||||
RicWellMeasurementImportTools::deleteAllEmptyMeasurementCurves();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -141,6 +141,21 @@ void RicWellMeasurementImportTools::removeWellMeasurementsFromFiles( const std::
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellMeasurementImportTools::deleteAllEmptyMeasurementCurves()
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
std::vector<RimWellMeasurementCollection*> measurementCollections;
|
||||
app->project()->descendantsIncludingThisOfType( measurementCollections );
|
||||
for ( auto measurementCollection : measurementCollections )
|
||||
{
|
||||
measurementCollection->deleteAllEmptyCurves();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -33,6 +33,7 @@ class RicWellMeasurementImportTools
|
||||
public:
|
||||
static void importWellMeasurementsFromFiles( const std::vector<RimWellMeasurementFilePath*>& filePaths );
|
||||
static void removeWellMeasurementsFromFiles( const std::vector<RimWellMeasurementFilePath*>& filePaths );
|
||||
static void deleteAllEmptyMeasurementCurves();
|
||||
|
||||
static void importWellMeasurementsFromFiles( const QStringList& filePaths, RimWellPathCollection* wellPathCollection );
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack( RimWellLogTra
|
||||
curve->firstAncestorOrThisOfType( wellLogPlotTrack );
|
||||
if ( wellLogPlotTrack )
|
||||
{
|
||||
wellLogPlotTrack->takeOutCurve( curve );
|
||||
wellLogPlotTrack->removeCurve( curve );
|
||||
wellLogPlotTrack->updateConnectedEditors();
|
||||
srcTracks.insert( wellLogPlotTrack );
|
||||
RimWellLogPlot* plot;
|
||||
|
||||
Reference in New Issue
Block a user