summaryrefslogtreecommitdiffstats
path: root/src/desktop-style.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-16 14:50:40 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-16 14:50:40 +0000
commiteb0e63b411b5f0713e73e95b9865294bd83fb646 (patch)
tree97773c5edb1f092ab1b3114e67005f7e9e9f987d /src/desktop-style.cpp
parentDon't use lowercase keyboard shortcuts in 3D box tool (diff)
downloadinkscape-eb0e63b411b5f0713e73e95b9865294bd83fb646.tar.gz
inkscape-eb0e63b411b5f0713e73e95b9865294bd83fb646.zip
Remember last used style for single 3D box faces (also fixes bug with wrongly assigned faces for duplicated boxes, e.g.)
(bzr r3481)
Diffstat (limited to 'src/desktop-style.cpp')
-rw-r--r--src/desktop-style.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index a6a4d8567..56fc9d4be 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -37,6 +37,7 @@
#include "sp-tspan.h"
#include "xml/repr.h"
#include "libnrtype/font-style-to-pos.h"
+#include "sp-path.h"
#include "desktop-style.h"
@@ -161,6 +162,17 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
sp_repr_css_merge(css_write, css);
sp_css_attr_unset_uris(css_write);
sp_repr_css_change(inkscape_get_repr(INKSCAPE, "desktop"), css_write, "style");
+ for (const GSList *i = desktop->selection->itemList(); i != NULL; i = i->next) {
+ /* last used styles for 3D box faces are stored separately */
+ if (SP_IS_PATH (i->data)) {
+ const char * descr = SP_OBJECT_REPR (G_OBJECT (i->data))->attribute ("inkscape:box3dface");
+ if (descr != NULL) {
+ gchar *style_grp = g_strconcat ("desktop.", descr, NULL);
+ sp_repr_css_change(inkscape_get_repr(INKSCAPE, style_grp), css_write, "style");
+ g_free (style_grp);
+ }
+ }
+ }
sp_repr_css_attr_unref(css_write);
}