Skip to content

Commit

Permalink
fix db handling when modifying existing color ramp (#6229)
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennesky committed Aug 31, 2012
1 parent 4b4ac5a commit 2ab844a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified resources/symbology-ng-style.db
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/symbol_xml2db.py
Expand Up @@ -36,7 +36,7 @@

_colorramp = "CREATE TABLE colorramp("\
"id INTEGER PRIMARY KEY,"\
"name TEXT,"\
"name TEXT UNIQUE,"\
"xml TEXT,"\
"groupid INTEGER)"

Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsstylev2.cpp
Expand Up @@ -187,8 +187,8 @@ bool QgsStyleV2::addColorRamp( QString name, QgsVectorColorRampV2* colorRamp, bo
if ( !colorRamp || name.isEmpty() )
return false;

// delete previous symbol (if any)
if ( mSymbols.contains( name ) )
// delete previous color ramps (if any)
if ( mColorRamps.contains( name ) )
{
// TODO remove groups and tags?
delete mColorRamps.value( name );
Expand Down

0 comments on commit 2ab844a

Please sign in to comment.