From 6f85c82ab5114e8cc97702ea8ab33e58b68a2163 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 9 Mar 2014 03:35:00 +0100 Subject: Fix random crashes when spraying in single path mode. Fixes LP bug #1274831 Fixed bugs: - https://launchpad.net/bugs/1274831 (bzr r13131) --- src/widgets/spray-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp index cf56b3255..788ce6475 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -47,7 +47,7 @@ using Inkscape::UI::PrefPusher; // Disabled in 0.91 because of Bug #1274831 (crash, spraying an object // with the mode: spray object in single path) // Please enable again when working on 1.0 -//#define ENABLE_SPRAY_MODE_SINGLE_PATH +#define ENABLE_SPRAY_MODE_SINGLE_PATH //######################## //## Spray ## -- cgit v1.2.3 From eb89a74bb3f220bba82de3c7ce3a73df951fab77 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 8 Mar 2014 22:44:03 -0500 Subject: Remove unused includes to tidy up the code. (bzr r13132) --- src/widgets/gradient-selector.h | 1 - src/widgets/sp-color-icc-selector.h | 1 - src/widgets/sp-color-wheel-selector.h | 1 - src/widgets/sp-xmlview-attr-list.h | 2 -- src/widgets/sp-xmlview-content.h | 5 ----- src/widgets/sp-xmlview-tree.h | 3 --- src/widgets/stroke-style.cpp | 1 + 7 files changed, 1 insertion(+), 13 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h index c88666b06..1f58de2e4 100644 --- a/src/widgets/gradient-selector.h +++ b/src/widgets/gradient-selector.h @@ -37,7 +37,6 @@ #include "sp-gradient.h" #include "sp-gradient-spread.h" #include "sp-gradient-units.h" -#include "gradient-image.h" class SPGradient; diff --git a/src/widgets/sp-color-icc-selector.h b/src/widgets/sp-color-icc-selector.h index 3eb12222c..f63ab0853 100644 --- a/src/widgets/sp-color-icc-selector.h +++ b/src/widgets/sp-color-icc-selector.h @@ -4,7 +4,6 @@ #include #include -#include "../color.h" #include "sp-color-selector.h" namespace Inkscape { diff --git a/src/widgets/sp-color-wheel-selector.h b/src/widgets/sp-color-wheel-selector.h index 8e0dc6cea..bbd377422 100644 --- a/src/widgets/sp-color-wheel-selector.h +++ b/src/widgets/sp-color-wheel-selector.h @@ -4,7 +4,6 @@ #include #include -#include "../color.h" #include "sp-color-slider.h" #include "sp-color-selector.h" diff --git a/src/widgets/sp-xmlview-attr-list.h b/src/widgets/sp-xmlview-attr-list.h index 8b1dae49b..367ef1a12 100644 --- a/src/widgets/sp-xmlview-attr-list.h +++ b/src/widgets/sp-xmlview-attr-list.h @@ -14,8 +14,6 @@ #include #include -#include "../xml/repr.h" - #define SP_TYPE_XMLVIEW_ATTR_LIST (sp_xmlview_attr_list_get_type ()) diff --git a/src/widgets/sp-xmlview-content.h b/src/widgets/sp-xmlview-content.h index 941ef0be1..8b1342c5e 100644 --- a/src/widgets/sp-xmlview-content.h +++ b/src/widgets/sp-xmlview-content.h @@ -13,16 +13,11 @@ */ #include - #include - #include -#include "../xml/repr.h" - #include - #define SP_TYPE_XMLVIEW_CONTENT (sp_xmlview_content_get_type ()) #define SP_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_CONTENT, SPXMLViewContent)) #define SP_IS_XMLVIEW_CONTENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_CONTENT)) diff --git a/src/widgets/sp-xmlview-tree.h b/src/widgets/sp-xmlview-tree.h index 50fcb3bc8..69228fa88 100644 --- a/src/widgets/sp-xmlview-tree.h +++ b/src/widgets/sp-xmlview-tree.h @@ -13,12 +13,9 @@ */ #include -#include "../xml/repr.h" - #include - #define SP_TYPE_XMLVIEW_TREE (sp_xmlview_tree_get_type ()) #define SP_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_XMLVIEW_TREE, SPXMLViewTree)) #define SP_IS_XMLVIEW_TREE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_XMLVIEW_TREE)) diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index d140cfb21..dbfb1bcd2 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -24,6 +24,7 @@ #include "svg/svg-color.h" #include "util/units.h" #include "ui/widget/unit-menu.h" +#include "desktop-widget.h" using Inkscape::DocumentUndo; using Inkscape::Util::unit_table; -- cgit v1.2.3 From 1d31728fb7399f48d272560a290dc990b75a197e Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 11 Mar 2014 15:52:08 +0100 Subject: Change stroke-dasharray and stroke-dashoffset handling to match other properties. Split style.h into more manageable size files. (bzr r13135) --- src/widgets/dash-selector.cpp | 20 ++++++++++---------- src/widgets/stroke-style.cpp | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp index afc81e574..fce7a9d9f 100644 --- a/src/widgets/dash-selector.cpp +++ b/src/widgets/dash-selector.cpp @@ -39,7 +39,7 @@ static double dash_4_1[] = {4.0, 1.0, -1.0}; static double dash_1_2[] = {1.0, 2.0, -1.0}; static double dash_1_4[] = {1.0, 4.0, -1.0}; -#define bd_len 7 // must correspond to the number of entries in the next line +static size_t BD_LEN = 7; // must correspond to the number of entries in the next line static double *builtin_dashes[] = {dash_0, dash_1_1, dash_2_1, dash_4_1, dash_1_2, dash_1_4, NULL}; static double **dashes = NULL; @@ -124,12 +124,12 @@ void SPDashSelector::init_dashes() { for (std::vector::iterator i = dash_prefs.begin(); i != dash_prefs.end(); ++i) { sp_style_read_from_prefs(style, *i); - if (style->stroke_dash.n_dash > 0) { - dashes[pos] = g_new (double, style->stroke_dash.n_dash + 1); + if (!style->stroke_dasharray.values.empty()) { + dashes[pos] = g_new (double, style->stroke_dasharray.values.size() + 1); double *d = dashes[pos]; - int i = 0; - for (; i < style->stroke_dash.n_dash; i++) { - d[i] = style->stroke_dash.dash[i]; + unsigned i = 0; + for (; i < style->stroke_dasharray.values.size(); i++) { + d[i] = style->stroke_dasharray.values[i]; } d[i] = -1; } else { @@ -138,12 +138,12 @@ void SPDashSelector::init_dashes() { pos += 1; } } else { // This code may never execute - a new preferences.xml is created for a new user. Maybe if the user deletes dashes from preferences.xml? - dashes = g_new (double *, bd_len + 2); // +1 for custom slot, +1 for terminator slot - int i; - for(i=0;istroke_dash.n_dash > 0) { + if (!style->stroke_dasharray.values.empty()) { double d[64]; - int len = MIN(style->stroke_dash.n_dash, 64); - for (int i = 0; i < len; i++) { + size_t len = MIN(style->stroke_dasharray.values.size(), 64); + for (unsigned i = 0; i < len; i++) { if (style->stroke_width.computed != 0) - d[i] = style->stroke_dash.dash[i] / style->stroke_width.computed; + d[i] = style->stroke_dasharray.values[i] / style->stroke_width.computed; else - d[i] = style->stroke_dash.dash[i]; // is there a better thing to do for stroke_width==0? + d[i] = style->stroke_dasharray.values[i]; // is there a better thing to do for stroke_width==0? } dsel->set_dash(len, d, style->stroke_width.computed != 0 ? - style->stroke_dash.offset / style->stroke_width.computed : - style->stroke_dash.offset); + style->stroke_dashoffset.value / style->stroke_width.computed : + style->stroke_dashoffset.value); } else { dsel->set_dash(0, NULL, 0.0); } -- cgit v1.2.3