summaryrefslogtreecommitdiffstats
path: root/src/desktop-style.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-02-15 10:07:50 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-02-15 10:07:50 +0000
commit634c4825c442c4d423bb68cae6c1d87e7d6db32d (patch)
tree7365463aae9dc1ad1034f9a6d5ddac2b2a45ca81 /src/desktop-style.cpp
parentfix for bug #184671 (Filter effects properties not updating correctly) (diff)
downloadinkscape-634c4825c442c4d423bb68cae6c1d87e7d6db32d.tar.gz
inkscape-634c4825c442c4d423bb68cae6c1d87e7d6db32d.zip
fix logic of sp_desktop_query_style_all so that copy/pasting style could work on text selections
(bzr r4734)
Diffstat (limited to 'src/desktop-style.cpp')
-rw-r--r--src/desktop-style.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index 7ff2be2c8..619986b57 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -1317,8 +1317,8 @@ sp_desktop_query_style(SPDesktop *desktop, SPStyle *style, int property)
}
/**
- * Do the same as sp_desktop_query_style for all (defined) style properties, return true if none of
- * the properties returned QUERY_STYLE_NOTHING.
+ * Do the same as sp_desktop_query_style for all (defined) style properties, return true if at
+ * least one of the properties did not return QUERY_STYLE_NOTHING.
*/
bool
sp_desktop_query_style_all (SPDesktop *desktop, SPStyle *query)
@@ -1335,7 +1335,17 @@ sp_desktop_query_style_all (SPDesktop *desktop, SPStyle *query)
int result_opacity = sp_desktop_query_style (desktop, query, QUERY_STYLE_PROPERTY_MASTEROPACITY);
int result_blur = sp_desktop_query_style (desktop, query, QUERY_STYLE_PROPERTY_BLUR);
- return (result_family != QUERY_STYLE_NOTHING && result_fstyle != QUERY_STYLE_NOTHING && result_fnumbers != QUERY_STYLE_NOTHING && result_fill != QUERY_STYLE_NOTHING && result_stroke != QUERY_STYLE_NOTHING && result_opacity != QUERY_STYLE_NOTHING && result_strokewidth != QUERY_STYLE_NOTHING && result_strokemiterlimit != QUERY_STYLE_NOTHING && result_strokecap != QUERY_STYLE_NOTHING && result_strokejoin != QUERY_STYLE_NOTHING && result_blur != QUERY_STYLE_NOTHING);
+ return (result_family != QUERY_STYLE_NOTHING ||
+ result_fstyle != QUERY_STYLE_NOTHING ||
+ result_fnumbers != QUERY_STYLE_NOTHING ||
+ result_fill != QUERY_STYLE_NOTHING ||
+ result_stroke != QUERY_STYLE_NOTHING ||
+ result_opacity != QUERY_STYLE_NOTHING ||
+ result_strokewidth != QUERY_STYLE_NOTHING ||
+ result_strokemiterlimit != QUERY_STYLE_NOTHING ||
+ result_strokecap != QUERY_STYLE_NOTHING ||
+ result_strokejoin != QUERY_STYLE_NOTHING ||
+ result_blur != QUERY_STYLE_NOTHING);
}