mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#592) Fixed autoscale for track move delete toggle
Also avoid to always do updateConnectedEditors on project when deleting a curve
This commit is contained in:
@@ -110,32 +110,40 @@ void RicDeleteItemExec::redo()
|
||||
wellPathColl->scheduleGeometryRegenAndRedrawViews();
|
||||
}
|
||||
|
||||
// Update due to deletion of curves (not tracks, handled separatly)
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
parentObj->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
wellLogPlot->zoomAllDepth();
|
||||
}
|
||||
|
||||
RimWellLogPlotTrack* wellLogPlotTrack;
|
||||
parentObj->firstAnchestorOrThisOfType(wellLogPlotTrack);
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
wellLogPlotTrack->zoomAllXAndZoomAllDepthOnOwnerPlot();
|
||||
wellLogPlotTrack->zoomAllXAxis();
|
||||
}
|
||||
|
||||
// Update due to delete plots
|
||||
// Make sure the plot collection disappears with the last plot
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(wellLogPlotCollection);
|
||||
RimWellLogPlotCollection* wellLogPlotCollection = dynamic_cast<RimWellLogPlotCollection*>(parentObj);
|
||||
if (wellLogPlotCollection)
|
||||
{
|
||||
RimProject* project = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(project);
|
||||
if (project)
|
||||
if (wellLogPlotCollection->wellLogPlots.empty())
|
||||
{
|
||||
project->updateConnectedEditors();
|
||||
RimProject* project = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
project->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RimViewLinkerCollection* viewLinkerCollection = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(viewLinkerCollection);
|
||||
if (viewLinkerCollection)
|
||||
|
||||
Reference in New Issue
Block a user