summaryrefslogtreecommitdiffstats
path: root/src/box3d-side.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-01-05 02:45:08 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-01-05 02:45:08 +0000
commitd9e47231bf6192aa4b3b9453dc159dbe16c35a41 (patch)
tree9c34d8e794802ca4c9817f24db0fed456fee8059 /src/box3d-side.cpp
parent* [INTL: sk] Updated Slovak translation: minor changes (diff)
downloadinkscape-d9e47231bf6192aa4b3b9453dc159dbe16c35a41.tar.gz
inkscape-d9e47231bf6192aa4b3b9453dc159dbe16c35a41.zip
Only set style of box sides during creation (not upon every repr write).
(bzr r4388)
Diffstat (limited to 'src/box3d-side.cpp')
-rw-r--r--src/box3d-side.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index e4f60075b..8cda01f72 100644
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
@@ -39,7 +39,6 @@ static void box3d_side_update (SPObject *object, SPCtx *ctx, guint flags);
//static void box3d_side_set_shape (SPShape *shape);
//static void box3d_side_update_patheffect (SPShape *shape, bool write);
-static void box3d_side_apply_style (Box3DSide *side);
static Proj::Pt3 box3d_side_corner (Box3DSide *side, guint index);
static std::vector<Proj::Pt3> box3d_side_corners (Box3DSide *side);
// static gint box3d_side_descr_to_id (gchar const *descr);
@@ -110,7 +109,7 @@ box3d_side_build (SPObject * object, SPDocument * document, Inkscape::XML::Node
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
- sp_object_read_attr (object, "inkscape:box3dsidetype");
+ sp_object_read_attr(object, "inkscape:box3dsidetype");
}
static Inkscape::XML::Node *
@@ -145,8 +144,6 @@ box3d_side_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
repr->setAttribute("d", d);
g_free (d);
- box3d_side_apply_style (side);
-
if (((SPObjectClass *) (parent_class))->write)
((SPObjectClass *) (parent_class))->write (object, repr, flags);
@@ -196,7 +193,6 @@ box3d_side_update (SPObject *object, SPCtx *ctx, guint flags)
//g_print ("box3d_side_update\n");
if (flags & (SP_OBJECT_MODIFIED_FLAG |
- //SP_OBJECT_CHILD_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG |
SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
sp_shape_set_shape ((SPShape *) object);
@@ -311,19 +307,10 @@ box3d_side_set_shape (SPShape *shape)
sp_curve_unref (c);
}
-static void
-//box3d_side_apply_style (SPBox3D *box, bool extruded) {
+void
box3d_side_apply_style (Box3DSide *side) {
Inkscape::XML::Node *repr_face = SP_OBJECT_REPR(SP_OBJECT(side));
- /**
- if (!extruded && !strcmp (box3d_side_axes_string (), "XYrear")) {
- // to avoid "flashing" during the initial dragging process, we make the rear face invisible in this case
- repr_face->setAttribute("style", "fill:none");
- return;
- }
- **/
-
gchar *descr = g_strconcat ("desktop.", box3d_side_axes_string (side), NULL);
const gchar * cur_style = prefs_get_string_attribute(descr, "style");
g_free (descr);