//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimWellLogPlot::moveTracks(RimWellLogTrack* insertAfterTrack, const std::vector<RimWellLogTrack*>& tracksToMove) { for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++) { RimWellLogTrack* track = tracksToMove[tIdx]; RimWellLogPlot* wellLogPlot; track->firstAncestorOrThisOfType(wellLogPlot); if (wellLogPlot) { wellLogPlot->removeTrack(track); wellLogPlot->updateTrackNames(); wellLogPlot->updateConnectedEditors(); } } size_t index = m_tracks.index(insertAfterTrack) + 1; for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++) { insertTrack(tracksToMove[tIdx], index + tIdx); } updateTrackNames(); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RicNewWellLogPlotTrackFeature::onActionTriggered(bool isChecked) { RimWellLogPlot* wellLogPlot = selectedWellLogPlot(); if (wellLogPlot) { RimWellLogTrack* plotTrack = new RimWellLogTrack; wellLogPlot->addTrack(plotTrack); plotTrack->setDescription(QString("Track %1").arg(wellLogPlot->trackCount())); wellLogPlot->updateConnectedEditors(); RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL); } }