summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-06 00:07:25 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-06 00:07:25 +0000
commitea6e0e4d2cd55a2b851a8504a68afff34fc6a683 (patch)
treea5529ebcf86551413491b721ab9328d08c6ad1df /src/widgets/toolbox.cpp
parentFilter effects dialog: (diff)
downloadinkscape-ea6e0e4d2cd55a2b851a8504a68afff34fc6a683.tar.gz
inkscape-ea6e0e4d2cd55a2b851a8504a68afff34fc6a683.zip
Store a global list of existing perspectives; for each perspective hold a list of associated boxes; explicitly pass perspectives as arguments when creating PLs
(bzr r3380)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index aeab3b45b..8acb08a12 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -2133,8 +2133,8 @@ static void sp_3dbox_toggle_vp_changed( GtkToggleAction *act, gpointer data )
break;
}
- if (SP3DBoxContext::current_perspective) {
- Box3D::VanishingPoint *vp = SP3DBoxContext::current_perspective->get_vanishing_point(axis);
+ if (Box3D::Perspective3D::current_perspective) {
+ Box3D::VanishingPoint *vp = Box3D::Perspective3D::current_perspective->get_vanishing_point(axis);
vp->toggle_parallel();
vp->draw(axis);
prefs_set_int_attribute( "tools.shapes.3dbox", pstring->str, vp->is_finite() ? 0 : 1);
@@ -2208,8 +2208,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
Inkscape::ICON_SIZE_DECORATION );
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_3dbox_toggle_vp_changed), GINT_TO_POINTER(Box3D::X));
- if (SP3DBoxContext::current_perspective) {
- toggled = SP3DBoxContext::current_perspective->get_vanishing_point(Box3D::X)->is_finite();
+ if (Box3D::Perspective3D::current_perspective) {
+ toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::X)->is_finite();
}
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled );
}
@@ -2223,8 +2223,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
Inkscape::ICON_SIZE_DECORATION );
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_3dbox_toggle_vp_changed), GINT_TO_POINTER(Box3D::Y));
- if (SP3DBoxContext::current_perspective) {
- toggled = SP3DBoxContext::current_perspective->get_vanishing_point(Box3D::Y)->is_finite();
+ if (Box3D::Perspective3D::current_perspective) {
+ toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::Y)->is_finite();
}
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled );
}
@@ -2238,8 +2238,8 @@ static void sp_3dbox_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
Inkscape::ICON_SIZE_DECORATION );
gtk_action_group_add_action( mainActions, GTK_ACTION( act ) );
g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_3dbox_toggle_vp_changed), GINT_TO_POINTER(Box3D::Z));
- if (SP3DBoxContext::current_perspective) {
- toggled = SP3DBoxContext::current_perspective->get_vanishing_point(Box3D::Z)->is_finite();
+ if (Box3D::Perspective3D::current_perspective) {
+ toggled = !Box3D::Perspective3D::current_perspective->get_vanishing_point(Box3D::Z)->is_finite();
}
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), toggled );
}