diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-08-09 23:49:05 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-08-09 23:49:05 +0000 |
| commit | 9e90b9d5ddb2ccae801d68975b4a9dee89996560 (patch) | |
| tree | d1ab924656e157eea414c3dca86aaf9eb2a1cc18 /src/widgets/toolbox.cpp | |
| parent | Status bar tips for VP draggers (diff) | |
| download | inkscape-9e90b9d5ddb2ccae801d68975b4a9dee89996560.tar.gz inkscape-9e90b9d5ddb2ccae801d68975b4a9dee89996560.zip | |
Hold perspectives on document level rather than globally; this corrects the changes made in commit #15681
(bzr r3445)
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 95decde95..7f4f637b4 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2129,10 +2129,11 @@ static void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions static void sp_3dbox_toggle_vp_changed( GtkToggleAction *act, gpointer data ) { + SPDocument *document = sp_desktop_document (inkscape_active_desktop ()); Box3D::Axis axis = (Box3D::Axis) GPOINTER_TO_INT(data); - if (Box3D::Perspective3D::current_perspective) { - Box3D::Perspective3D::current_perspective->toggle_boxes (axis); + if (document->current_perspective) { + document->current_perspective->toggle_boxes (axis); } } @@ -2193,6 +2194,7 @@ static void sp_3dboxtb_handles_state_changed( EgeSelectOneAction *act, GObject * static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder) { + SPDocument *document = sp_desktop_document (desktop); bool toggled = false; /* toggle VP in X direction */ { @@ -2202,8 +2204,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction "toggle_vp_x", Inkscape::ICON_SIZE_DECORATION ); gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); - if (Box3D::Perspective3D::current_perspective) { - toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::X)->is_finite(); + if (document->current_perspective) { + toggled = !document->current_perspective->get_vanishing_point(Box3D::X)->is_finite(); } gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled ); /* we connect the signal after setting the state to avoid switching the state again */ @@ -2218,8 +2220,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction "toggle_vp_y", Inkscape::ICON_SIZE_DECORATION ); gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); - if (Box3D::Perspective3D::current_perspective) { - toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::Y)->is_finite(); + if (document->current_perspective) { + toggled = !document->current_perspective->get_vanishing_point(Box3D::Y)->is_finite(); } gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled ); /* we connect the signal after setting the state to avoid switching the state again */ @@ -2234,8 +2236,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction "toggle_vp_z", Inkscape::ICON_SIZE_DECORATION ); gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); - if (Box3D::Perspective3D::current_perspective) { - toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::Z)->is_finite(); + if (document->current_perspective) { + toggled = !document->current_perspective->get_vanishing_point(Box3D::Z)->is_finite(); } /* we connect the signal after setting the state to avoid switching the state again */ gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled ); |
