From 2a9dd6d81e787a3daa8f1e85feba6e8c0ccdab67 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Sat, 23 Feb 2008 23:40:33 +0000 Subject: [PATCH] Fix LP #194718 --- src/box3d-context.cpp | 8 ++++---- src/persp3d.cpp | 6 +++--- src/persp3d.h | 2 +- src/widgets/toolbox.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index a1e033955..e03f7d184 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -188,7 +188,7 @@ static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, g SPDocument *doc = sp_desktop_document(bc->desktop); doc->persps_sel.clear(); - doc->persps_sel = persp3d_currently_selected_persps(ec); + doc->persps_sel = persp3d_currently_selected_persps(); SPItem *item = selection->singleItem(); if (item) { @@ -509,7 +509,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven ret = TRUE; } if (MOD__SHIFT_ONLY) { - persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::X); + persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::X); bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically? ret = true; } @@ -518,7 +518,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven case GDK_y: case GDK_Y: if (MOD__SHIFT_ONLY) { - persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Y); + persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::Y); bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically? ret = true; } @@ -527,7 +527,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven case GDK_z: case GDK_Z: if (MOD__SHIFT_ONLY) { - persp3d_toggle_VPs(persp3d_currently_selected_persps(event_context), Proj::Z); + persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::Z); bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically? ret = true; } diff --git a/src/persp3d.cpp b/src/persp3d.cpp index d6ae5bd24..4b594d754 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -552,8 +552,8 @@ persp3d_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/, /* returns a std::set() of all perspectives of the currently selected boxes */ std::set -persp3d_currently_selected_persps (SPEventContext *ec) { - Inkscape::Selection *selection = sp_desktop_selection (ec->desktop); +persp3d_currently_selected_persps () { + Inkscape::Selection *selection = sp_desktop_selection(inkscape_active_desktop()); std::set p; for (GSList *i = (GSList *) selection->itemList(); i != NULL; i = i->next) { @@ -632,7 +632,7 @@ persp3d_print_all_selected() { g_print ("\n======================================\n"); g_print ("Selected perspectives and their boxes:\n"); - std::set sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context()); + std::set sel_persps = persp3d_currently_selected_persps(); for (std::set::iterator j = sel_persps.begin(); j != sel_persps.end(); ++j) { Persp3D *persp = SP_PERSP3D(*j); diff --git a/src/persp3d.h b/src/persp3d.h index 0ab04fe39..37072889c 100644 --- a/src/persp3d.h +++ b/src/persp3d.h @@ -91,7 +91,7 @@ void persp3d_absorb(Persp3D *persp1, Persp3D *persp2); Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3D *dup = NULL); -std::set persp3d_currently_selected_persps (SPEventContext *ec); +std::set persp3d_currently_selected_persps(); bool persp3d_has_all_boxes_in_selection (Persp3D *persp); std::list persp3d_selected_boxes (Persp3D *persp); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index fcf3e0ce6..8ea410da3 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2512,7 +2512,7 @@ box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis ax g_object_set_data(dataKludge, "freeze_angle", GINT_TO_POINTER(TRUE)); //Persp3D *persp = document->current_persp3d; - std::set sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context()); + std::set sel_persps = persp3d_currently_selected_persps(); if (sel_persps.empty()) { // this can happen when the document is created; we silently ignore it return; @@ -2551,7 +2551,7 @@ box3d_angle_z_value_changed(GtkAdjustment *adj, GObject *dataKludge) static void box3d_vp_state_changed( GtkToggleAction *act, GtkAction *box3d_angle, Proj::Axis axis ) { // TODO: Take all selected perspectives into account - std::set sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context()); + std::set sel_persps = persp3d_currently_selected_persps(); if (sel_persps.empty()) { // this can happen when the document is created; we silently ignore it return; -- 2.39.5