Skip to content

Commit

Permalink
Fix creation of QgsGradientColorRamp stops from properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 4, 2024
1 parent f0b4c06 commit 0bf5f90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgscolorrampimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ QgsColorRamp *QgsGradientColorRamp::create( const QVariantMap &props )
QgsGradientStopsList stops;
if ( props.contains( QStringLiteral( "stops" ) ) )
{
const auto constSplit = props[QStringLiteral( "stops" )].toString().split( ':' );
const thread_local QRegularExpression rx( QStringLiteral( "(?<!,rgb)(?<!,cmyk)(?<!,hsl)(?<!,hsv):" ) );
const auto constSplit = props[QStringLiteral( "stops" )].toString().split( rx );
for ( const QString &stop : constSplit )
{
const QStringList parts = stop.split( ';' );
Expand Down

0 comments on commit 0bf5f90

Please sign in to comment.