summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 801127b)
raw | patch | inline | side by side (parent: 801127b)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 23 Feb 2008 23:40:33 +0000 (23:40 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 23 Feb 2008 23:40:33 +0000 (23:40 +0000) |
src/box3d-context.cpp | patch | blob | history | |
src/persp3d.cpp | patch | blob | history | |
src/persp3d.h | patch | blob | history | |
src/widgets/toolbox.cpp | patch | blob | history |
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index a1e033955cc98761b2c8b853123d039bc39b2660..e03f7d184bfbb06f5831d045f02c9403e75d1356 100644 (file)
--- 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 d6ae5bd244b5dff6fbb2820a064ae0156095b893..4b594d754fd9ded04022a6adbd21df4c236ba2c9 100644 (file)
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
/* returns a std::set() of all perspectives of the currently selected boxes */
std::set<Persp3D *>
-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<Persp3D *> p;
for (GSList *i = (GSList *) selection->itemList(); i != NULL; i = i->next) {
g_print ("\n======================================\n");
g_print ("Selected perspectives and their boxes:\n");
- std::set<Persp3D *> sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context());
+ std::set<Persp3D *> sel_persps = persp3d_currently_selected_persps();
for (std::set<Persp3D *>::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 0ab04fe3920180bc19a92274f179aa31de29c24c..37072889c46f10f53b0d3cb8c0750e2441810ef6 100644 (file)
--- a/src/persp3d.h
+++ b/src/persp3d.h
Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3D *dup = NULL);
-std::set<Persp3D *> persp3d_currently_selected_persps (SPEventContext *ec);
+std::set<Persp3D *> persp3d_currently_selected_persps();
bool persp3d_has_all_boxes_in_selection (Persp3D *persp);
std::list<SPBox3D *> persp3d_selected_boxes (Persp3D *persp);
index fcf3e0ce6bd874917ee2b0730179a33b326adf6e..8ea410da31b15da9c50fcf9ca52c0fd3878a5389 100644 (file)
--- 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<Persp3D *> sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context());
+ std::set<Persp3D *> sel_persps = persp3d_currently_selected_persps();
if (sel_persps.empty()) {
// this can happen when the document is created; we silently ignore it
return;
static void box3d_vp_state_changed( GtkToggleAction *act, GtkAction *box3d_angle, Proj::Axis axis )
{
// TODO: Take all selected perspectives into account
- std::set<Persp3D *> sel_persps = persp3d_currently_selected_persps (inkscape_active_event_context());
+ std::set<Persp3D *> sel_persps = persp3d_currently_selected_persps();
if (sel_persps.empty()) {
// this can happen when the document is created; we silently ignore it
return;