summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-07-09 05:02:03 +0000
committerJon A. Cruz <jon@joncruz.org>2010-07-09 05:02:03 +0000
commit50f9aa34d9c9563df9002d8a70ae37a747c8f422 (patch)
treec217dfbf84f501624398df22b279403ec610a508 /src/gradient-chemistry.cpp
parent7th update, almost there (diff)
downloadinkscape-50f9aa34d9c9563df9002d8a70ae37a747c8f422.tar.gz
inkscape-50f9aa34d9c9563df9002d8a70ae37a747c8f422.zip
Cleanup of gradient swatch property and collection policy.
(bzr r9602)
Diffstat (limited to 'src/gradient-chemistry.cpp')
-rw-r--r--src/gradient-chemistry.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 8a199d4a3..974a13b5f 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -1203,11 +1203,13 @@ SPGradient *sp_document_default_gradient_vector( SPDocument *document, SPColor c
Inkscape::XML::Node *repr = xml_doc->createElement("svg:linearGradient");
- repr->setAttribute("inkscape:collect", "always");
- // set here, but removed when it's edited in the gradient editor
- // to further reduce clutter, we could
- // (1) here, search gradients by color and return what is found without duplication
- // (2) in fill & stroke, show only one copy of each gradient in list
+ if ( !singleStop ) {
+ repr->setAttribute("inkscape:collect", "always");
+ // set here, but removed when it's edited in the gradient editor
+ // to further reduce clutter, we could
+ // (1) here, search gradients by color and return what is found without duplication
+ // (2) in fill & stroke, show only one copy of each gradient in list
+ }
Glib::ustring colorStr = color.toString();
addStop( repr, colorStr, 1, "0" );