diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index d457b1318e27d17946bb69a29ec0b35b762cecec..b662ca2de56057f79ab84f4bf13393b793129860 100644 (file)
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
@@ -369,6 +369,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
if (orig == NULL) {
return false;
}
+
Path *res = new Path;
res->SetBackData(false);
@@ -455,10 +456,15 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
if (res->descr_cmd.size() > 1) {
gchar *str = res->svg_dump_path();
- if (newrepr)
+ if (newrepr) {
newrepr->setAttribute("d", str);
- else
- SP_OBJECT_REPR(item)->setAttribute("d", str);
+ } else {
+ if (SP_IS_SHAPE(item) && SP_SHAPE(item)->path_effect_href) {
+ SP_OBJECT_REPR(item)->setAttribute("inkscape:original-d", str);
+ } else {
+ SP_OBJECT_REPR(item)->setAttribute("d", str);
+ }
+ }
g_free(str);
} else {
// TODO: if there's 0 or 1 node left, delete this path altogether
} else {
this_force = force * tweak_profile (NR::L2 (p - center), radius);
}
-
+
if (this_force > 0.002) {
if (do_fill) {
- if (style->fill.type == SP_PAINT_TYPE_COLOR) {
+ if (style->fill.isPaintserver()) {
+ tweak_colors_in_gradient (item, true, fill_goal, p, radius, this_force, mode, do_h, do_s, do_l, do_o);
+ did = true;
+ } else if (style->fill.isColor()) {
tweak_color (mode, style->fill.value.color.v.c, fill_goal, this_force, do_h, do_s, do_l);
item->updateRepr();
did = true;
- } else if (style->fill.type == SP_PAINT_TYPE_PAINTSERVER) {
- tweak_colors_in_gradient (item, true, fill_goal, p, radius, this_force, mode, do_h, do_s, do_l, do_o);
- did = true;
}
}
if (do_stroke) {
- if (style->stroke.type == SP_PAINT_TYPE_COLOR) {
+ if (style->stroke.isPaintserver()) {
+ tweak_colors_in_gradient (item, false, stroke_goal, p, radius, this_force, mode, do_h, do_s, do_l, do_o);
+ did = true;
+ } else if (style->stroke.isColor()) {
tweak_color (mode, style->stroke.value.color.v.c, stroke_goal, this_force, do_h, do_s, do_l);
item->updateRepr();
did = true;
- } else if (style->stroke.type == SP_PAINT_TYPE_PAINTSERVER) {
- tweak_colors_in_gradient (item, false, stroke_goal, p, radius, this_force, mode, do_h, do_s, do_l, do_o);
- did = true;
}
}
if (do_opacity && do_o) {
@@ -795,7 +801,7 @@ sp_tweak_dilate (SPTweakContext *tc, NR::Point event_p, NR::Point p, NR::Point v
if (radius == 0 || force == 0) {
return false;
}
- double color_force = MIN(sqrt(force)/4.0, 1);
+ double color_force = MIN(sqrt(force)/20.0, 1);
SPItem *item_at_point = SP_EVENT_CONTEXT(tc)->desktop->item_at_point(event_p, TRUE);
Inkscape::XML::Node *tool_repr = inkscape_get_repr(INKSCAPE, "tools.tweak");
num = g_slist_length((GSList *) desktop->selection->itemList());
}
if (num == 0) {
- tc->_message_context->set(Inkscape::NORMAL_MESSAGE, _("<b>Select objects</b> to tweak"));
+ tc->_message_context->set(Inkscape::NORMAL_MESSAGE, _("<b>Nothing selected!</b> Select objects to tweak."));
} else {
switch (tc->mode) {
case TWEAK_MODE_PUSH: