summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-02-03 03:01:53 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-02-03 03:01:53 +0000
commit0522b847205202f0ad614ae0f21bce3b60977c04 (patch)
tree2ece1c4b6b4692cb82a1f1017ffd0617e608bb03 /src/style.cpp
parentremove screen pixel toggle for now, add always-snap widget for all (diff)
downloadinkscape-0522b847205202f0ad614ae0f21bce3b60977c04.tar.gz
inkscape-0522b847205202f0ad614ae0f21bce3b60977c04.zip
further fix: remember is paintservers were hreffed in a flag, fixes undo crash
(bzr r66)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/style.cpp b/src/style.cpp
index afaded2a1..9dd950361 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -389,6 +389,7 @@ sp_style_new()
sp_style_clear(style);
style->cloned = false;
+ style->hreffed = false;
return style;
}
@@ -2000,6 +2001,7 @@ sp_style_merge_ipaint(SPStyle *style, SPIPaint *paint, SPIPaint const *parent)
paint->value.paint.uri = parent->value.paint.uri;
if (paint->value.paint.server) {
if (style->object && !style->cloned) { // href paintserver for style of non-clones only
+ style->hreffed = true;
sp_object_href(SP_OBJECT(paint->value.paint.server), style);
}
if (style->object || style->cloned) { // connect to signals for style of real objects or clones (this excludes temp styles)
@@ -2854,6 +2856,7 @@ sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocume
paint->value.paint.server = SP_PAINT_SERVER(ps);
if (style->object && !style->cloned) {
sp_object_href(SP_OBJECT(paint->value.paint.server), style);
+ style->hreffed = true;
}
if (style->object || style->cloned) {
g_signal_connect(G_OBJECT(paint->value.paint.server), "release",
@@ -3396,7 +3399,7 @@ sp_style_paint_clear(SPStyle *style, SPIPaint *paint,
unsigned hunref, unsigned unset)
{
if (hunref && (paint->type == SP_PAINT_TYPE_PAINTSERVER) && paint->value.paint.server) {
- if (style->object && !style->cloned) {
+ if (style->hreffed) {
sp_object_hunref(SP_OBJECT(paint->value.paint.server), style);
}
if (style->object || style->cloned) {