Code

Warning cleanup.
[inkscape.git] / src / draw-context.cpp
index 7fdda437c391263de727bd0d453dfd891d2ce7b8..5e3ff82dc4539154b6379478f8c0e370297d4db0 100644 (file)
@@ -373,7 +373,12 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item)
         if (shape_applied) {
             // apply original stroke color as fill and unset stroke; then return
             SPCSSAttr *css = sp_repr_css_attr_new();
-            sp_repr_css_set_property (css, "fill", cstroke);
+
+            if (!strcmp(cstroke, "none")){
+                sp_repr_css_set_property (css, "fill", "black");
+            } else {
+                sp_repr_css_set_property (css, "fill", cstroke);
+            }
             sp_repr_css_set_property (css, "stroke", "none");
             sp_desktop_apply_css_recursive(SP_OBJECT(item), css, true);
             sp_repr_css_attr_unref(css);
@@ -692,7 +697,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
             item->updateRepr();
         }
 
-        sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL, 
+        sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL,
                          _("Draw path"));
 
         // When quickly drawing several subpaths with Shift, the next subpath may be finished and
@@ -829,7 +834,7 @@ void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char cons
     /* put the circle where the mouse click occurred and set the diameter to the
        current stroke width, multiplied by the amount specified in the preferences */
     Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    
+
     Geom::Matrix const i2d (sp_item_i2d_affine (item));
     Geom::Point pp = pt * i2d;
     double rad = 0.5 * prefs->getDouble(tool_path + "/dot-size", 3.0);