diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-10-24 22:58:43 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-10-24 22:58:43 +0000 |
| commit | 532f77b14a76fc04e6bdeca3625f9a55b5f11bdf (patch) | |
| tree | b70df28300f24edde9b04d0c7704c11c295c4c62 /src/ui/interface.cpp | |
| parent | [Bug #1636086] Update Catalan translation for Inkscape 0.92. (diff) | |
| download | inkscape-532f77b14a76fc04e6bdeca3625f9a55b5f11bdf.tar.gz inkscape-532f77b14a76fc04e6bdeca3625f9a55b5f11bdf.zip | |
CPPification: almost all sp_object_set_whatever and sp_selection_whatever global functions are now methods of ObjectSet*, with these additional benefits:
- They can now act on any SelectionSet, not just the current selection;
- Whenever possible, they don't need a desktop anymore and can run if called from GUI.
I hope I did not break too many things in the process.
*: So instead of callink sp_selection_move(desktop,x,y), you call myobjectset->move(x,y)
(bzr r15189)
Diffstat (limited to 'src/ui/interface.cpp')
| -rw-r--r-- | src/ui/interface.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index b47e66451..e0c767509 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1210,7 +1210,7 @@ sp_ui_drag_data_received(GtkWidget *widget, Geom::OptRect sel_bbox = selection->visualBounds(); if (sel_bbox) { Geom::Point m( desktop->point() - sel_bbox->midpoint() ); - sp_object_set_move_relative(selection, m, false); + selection->moveRelative(m, false); } } @@ -1841,28 +1841,28 @@ void ContextMenu::ItemCreateLink(void) void ContextMenu::SetMask(void) { - sp_selection_set_mask(_desktop, false, false); + _desktop->selection->setMask(false, false); } void ContextMenu::ReleaseMask(void) { - sp_selection_unset_mask(_desktop, false); + _desktop->selection->unsetMask(false); } void ContextMenu::CreateGroupClip(void) { - sp_selection_set_clipgroup(_desktop); + _desktop->selection->setClipGroup(); } void ContextMenu::SetClip(void) { - sp_selection_set_mask(_desktop, true, false); + _desktop->selection->setMask(true, false); } void ContextMenu::ReleaseClip(void) { - sp_selection_unset_mask(_desktop, true); + _desktop->selection->unsetMask(true); } void ContextMenu::MakeGroupMenu(void) @@ -1876,7 +1876,7 @@ void ContextMenu::MakeGroupMenu(void) void ContextMenu::ActivateGroup(void) { - sp_selection_group(_desktop->selection, _desktop); + _desktop->selection->group(); } void ContextMenu::ActivateUngroup(void) @@ -1889,7 +1889,7 @@ void ContextMenu::ActivateUngroup(void) void ContextMenu::ActivateUngroupPopSelection(void) { - sp_selection_ungroup_pop_selection(_desktop->selection, _desktop); + _desktop->selection->popFromGroup(); } |
