mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix update of track names following DnD
This commit is contained in:
@@ -106,8 +106,8 @@ RimWellLogPlot::RimWellLogPlot()
|
||||
m_nameConfig.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_nameConfig = new RimWellLogPlotNameConfig();
|
||||
|
||||
m_availableDepthUnits = {RiaDefines::UNIT_METER, RiaDefines::UNIT_FEET};
|
||||
m_availableDepthTypes = {MEASURED_DEPTH, TRUE_VERTICAL_DEPTH};
|
||||
m_availableDepthUnits = { RiaDefines::UNIT_METER, RiaDefines::UNIT_FEET };
|
||||
m_availableDepthTypes = { MEASURED_DEPTH, TRUE_VERTICAL_DEPTH };
|
||||
|
||||
m_minAvailableDepth = HUGE_VAL;
|
||||
m_maxAvailableDepth = -HUGE_VAL;
|
||||
@@ -519,6 +519,26 @@ void RimWellLogPlot::onPlotAdditionOrRemoval()
|
||||
RimGridPlotWindow::onPlotAdditionOrRemoval();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::updatePlotNames()
|
||||
{
|
||||
auto plotVector = plots();
|
||||
for ( size_t tIdx = 0; tIdx < plotVector.size(); ++tIdx )
|
||||
{
|
||||
RimWellLogTrack* track = dynamic_cast<RimWellLogTrack*>( plotVector[tIdx] );
|
||||
CAF_ASSERT( track );
|
||||
if ( track )
|
||||
{
|
||||
QString description = track->description();
|
||||
QRegularExpression regexp( "Track \\d+" );
|
||||
description.replace( regexp, QString( "Track %1" ).arg( tIdx + 1 ) );
|
||||
track->setDescription( description );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user