mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 15:26:48 -06:00
(#467) Postponing updates until all tracks have been moved to a plot
This commit is contained in:
parent
b2e04b47d9
commit
36f2229b5b
@ -58,19 +58,28 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* wel
|
||||
{
|
||||
CVF_ASSERT(wellLogPlot);
|
||||
|
||||
RimWellLogPlotTrack* wellLogPlotTrack = NULL;
|
||||
|
||||
for (size_t tIdx = 0; tIdx < tracks.size(); tIdx++)
|
||||
{
|
||||
wellLogPlotTrack = tracks[tIdx];
|
||||
|
||||
RimWellLogPlot* oldPlot;
|
||||
tracks[tIdx]->firstAnchestorOrThisOfType(oldPlot);
|
||||
wellLogPlotTrack->firstAnchestorOrThisOfType(oldPlot);
|
||||
if (oldPlot)
|
||||
{
|
||||
oldPlot->removeTrack(tracks[tIdx]);
|
||||
oldPlot->removeTrack(wellLogPlotTrack);
|
||||
oldPlot->updateConnectedEditors();
|
||||
}
|
||||
|
||||
wellLogPlot->addTrack(tracks[tIdx]);
|
||||
wellLogPlot->updateTracks();
|
||||
wellLogPlot->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->projectTreeView()->selectAsCurrentItem(tracks[tIdx]);
|
||||
wellLogPlot->addTrack(wellLogPlotTrack);
|
||||
}
|
||||
|
||||
wellLogPlot->updateTracks();
|
||||
wellLogPlot->updateConnectedEditors();
|
||||
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
RiuMainWindow::instance()->projectTreeView()->selectAsCurrentItem(wellLogPlotTrack);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user