mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
Avoid duplication of the same text in plot title
For calculated curves, the name vector name is often created using underscore. Check if the vector name already is present in the title. Related to https://github.com/OPM/ResInsight/issues/12157
This commit is contained in:
1 parent
bb18a269ed
commit
ae04096cf5
1 file changed
+7
-1
@@ -102,7 +102,13 @@ QString RimSummaryNameHelper::aggregatedPlotTitle( const RimSummaryNameHelper& o
|
||||
size_t pos = vectorName.find( '_' );
|
||||
if ( pos != std::string::npos )
|
||||
{
|
||||
title += QString( " (%1)" ).arg( QString::fromStdString( vectorName ) );
|
||||
// For calculated curves, the name vector name is often created using underscore. Check if the vector name already is
|
||||
// present in the title.
|
||||
auto qtVectorName = QString::fromStdString( vectorName );
|
||||
if ( title.indexOf( qtVectorName ) == -1 )
|
||||
{
|
||||
title += QString( " (%1)" ).arg( QString::fromStdString( vectorName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user