mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
fix db handling when modifying existing color ramp (#6229)
This commit is contained in:
parent
4b4ac5a5ac
commit
2ab844abf8
Binary file not shown.
@ -36,7 +36,7 @@ _symbol = "CREATE TABLE symbol("\
|
|||||||
|
|
||||||
_colorramp = "CREATE TABLE colorramp("\
|
_colorramp = "CREATE TABLE colorramp("\
|
||||||
"id INTEGER PRIMARY KEY,"\
|
"id INTEGER PRIMARY KEY,"\
|
||||||
"name TEXT,"\
|
"name TEXT UNIQUE,"\
|
||||||
"xml TEXT,"\
|
"xml TEXT,"\
|
||||||
"groupid INTEGER)"
|
"groupid INTEGER)"
|
||||||
|
|
||||||
|
|||||||
@ -187,8 +187,8 @@ bool QgsStyleV2::addColorRamp( QString name, QgsVectorColorRampV2* colorRamp, bo
|
|||||||
if ( !colorRamp || name.isEmpty() )
|
if ( !colorRamp || name.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// delete previous symbol (if any)
|
// delete previous color ramps (if any)
|
||||||
if ( mSymbols.contains( name ) )
|
if ( mColorRamps.contains( name ) )
|
||||||
{
|
{
|
||||||
// TODO remove groups and tags?
|
// TODO remove groups and tags?
|
||||||
delete mColorRamps.value( name );
|
delete mColorRamps.value( name );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user