(#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:
Jacob Støren
2015-10-29 10:29:48 +01:00
parent 669bacb2a5
commit 21b1e6c6e6
7 changed files with 73 additions and 54 deletions

View File

@@ -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)