From 1636c1dd1651780d01759676b194312529f211f7 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Sat, 25 Jun 2016 22:24:26 +0200 Subject: Moved next functions, added namespace, renamed range functions (bzr r14954.1.10) --- src/ui/tools/select-tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index b5ec3d88e..676a41eaa 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -477,7 +477,7 @@ bool SelectTool::root_handler(GdkEvent* event) { case GDK_2BUTTON_PRESS: if (event->button.button == 1) { if (!selection->isEmpty()) { - SPItem *clicked_item = selection->itemList()[0]; + SPItem *clicked_item = selection->items()[0]; if (dynamic_cast(clicked_item) && !dynamic_cast(clicked_item)) { // enter group if it's not a 3D box desktop->setCurrentLayer(clicked_item); -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/ui/tools/select-tool.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index b5ec3d88e..5d802d4da 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -15,7 +15,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include #include @@ -40,14 +40,12 @@ #include "desktop.h" #include "sp-root.h" -#include "preferences.h" #include "ui/tools-switch.h" #include "message-stack.h" #include "selection-describer.h" #include "seltrans.h" #include "box3d.h" #include "display/sp-canvas.h" -#include "display/sp-canvas-item.h" #include "display/drawing-item.h" using Inkscape::DocumentUndo; -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/ui/tools/select-tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 5d802d4da..b5ec3d88e 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -15,7 +15,7 @@ */ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include #include @@ -40,12 +40,14 @@ #include "desktop.h" #include "sp-root.h" +#include "preferences.h" #include "ui/tools-switch.h" #include "message-stack.h" #include "selection-describer.h" #include "seltrans.h" #include "box3d.h" #include "display/sp-canvas.h" +#include "display/sp-canvas-item.h" #include "display/drawing-item.h" using Inkscape::DocumentUndo; -- cgit v1.2.3 From 49a7927ecf31ace696e9e5770e8d6543c356db7a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 19:15:34 +0100 Subject: Finish removing GTK+ 2 fallbacks (bzr r15023.2.8) --- src/ui/tools/select-tool.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index b5ec3d88e..b29fb6979 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -128,20 +128,12 @@ SelectTool::~SelectTool() { this->_describer = NULL; if (CursorSelectDragging) { -#if GTK_CHECK_VERSION(3,0,0) g_object_unref(CursorSelectDragging); -#else - gdk_cursor_unref (CursorSelectDragging); -#endif CursorSelectDragging = NULL; } if (CursorSelectMouseover) { -#if GTK_CHECK_VERSION(3,0,0) g_object_unref(CursorSelectMouseover); -#else - gdk_cursor_unref (CursorSelectMouseover); -#endif CursorSelectMouseover = NULL; } } -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/ui/tools/select-tool.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index b5ec3d88e..5d802d4da 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -15,7 +15,7 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include #include @@ -40,14 +40,12 @@ #include "desktop.h" #include "sp-root.h" -#include "preferences.h" #include "ui/tools-switch.h" #include "message-stack.h" #include "selection-describer.h" #include "seltrans.h" #include "box3d.h" #include "display/sp-canvas.h" -#include "display/sp-canvas-item.h" #include "display/drawing-item.h" using Inkscape::DocumentUndo; -- cgit v1.2.3 From 7be3086bf70ba9bf28c5cfe06fd7a8e28e719bcc Mon Sep 17 00:00:00 2001 From: sandra-snan Date: Sat, 8 Oct 2016 08:16:53 +0200 Subject: [Bug #770681] KEY MAPPING: Comma and period hijacked by scaling. Fixed bugs: - https://launchpad.net/bugs/770681 (bzr r15155) --- src/ui/tools/select-tool.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 86a2dbed3..0cdeda0b6 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -1045,37 +1045,7 @@ bool SelectTool::root_handler(GdkEvent* event) { ret = TRUE; break; - - case GDK_KEY_less: - case GDK_KEY_comma: - if (MOD__ALT(event)) { - gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_scale_screen(selection, -2*mul); - } else if (MOD__CTRL(event)) { - sp_selection_scale_times(selection, 0.5); - } else { - gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_scale(selection, -offset*mul); - } - - ret = TRUE; - break; - - case GDK_KEY_greater: - case GDK_KEY_period: - if (MOD__ALT(event)) { - gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_scale_screen(selection, 2*mul); - } else if (MOD__CTRL(event)) { - sp_selection_scale_times(selection, 2); - } else { - gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_scale(selection, offset*mul); - } - - ret = TRUE; - break; - + case GDK_KEY_Return: if (MOD__CTRL_ONLY(event)) { if (selection->singleItem()) { -- cgit v1.2.3 From 532f77b14a76fc04e6bdeca3625f9a55b5f11bdf Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 25 Oct 2016 00:58:43 +0200 Subject: 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) --- src/ui/tools/select-tool.cpp | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/ui/tools/select-tool.cpp') diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 0cdeda0b6..6c450b3dc 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -902,15 +902,15 @@ bool SelectTool::root_handler(GdkEvent* event) { if (MOD__ALT(event)) { // alt if (MOD__SHIFT(event)) { - sp_selection_move_screen(desktop->getSelection(), mul*-10, 0); // shift + desktop->getSelection()->moveScreen(mul*-10, 0); // shift } else { - sp_selection_move_screen(desktop->getSelection(), mul*-1, 0); // no shift + desktop->getSelection()->moveScreen(mul*-1, 0); // no shift } } else { // no alt if (MOD__SHIFT(event)) { - sp_selection_move(desktop->getSelection(), mul*-10*nudge, 0); // shift + desktop->getSelection()->move(mul*-10*nudge, 0); // shift } else { - sp_selection_move(desktop->getSelection(), mul*-nudge, 0); // no shift + desktop->getSelection()->move(mul*-nudge, 0); // no shift } } @@ -925,15 +925,15 @@ bool SelectTool::root_handler(GdkEvent* event) { if (MOD__ALT(event)) { // alt if (MOD__SHIFT(event)) { - sp_selection_move_screen(desktop->getSelection(), 0, mul*10); // shift + desktop->getSelection()->moveScreen(0, mul*10); // shift } else { - sp_selection_move_screen(desktop->getSelection(), 0, mul*1); // no shift + desktop->getSelection()->moveScreen(0, mul*1); // no shift } } else { // no alt if (MOD__SHIFT(event)) { - sp_selection_move(desktop->getSelection(), 0, mul*10*nudge); // shift + desktop->getSelection()->move(0, mul*10*nudge); // shift } else { - sp_selection_move(desktop->getSelection(), 0, mul*nudge); // no shift + desktop->getSelection()->move(0, mul*nudge); // no shift } } @@ -948,15 +948,15 @@ bool SelectTool::root_handler(GdkEvent* event) { if (MOD__ALT(event)) { // alt if (MOD__SHIFT(event)) { - sp_selection_move_screen(desktop->getSelection(), mul*10, 0); // shift + desktop->getSelection()->moveScreen(mul*10, 0); // shift } else { - sp_selection_move_screen(desktop->getSelection(), mul*1, 0); // no shift + desktop->getSelection()->moveScreen(mul*1, 0); // no shift } } else { // no alt if (MOD__SHIFT(event)) { - sp_selection_move(desktop->getSelection(), mul*10*nudge, 0); // shift + desktop->getSelection()->move(mul*10*nudge, 0); // shift } else { - sp_selection_move(desktop->getSelection(), mul*nudge, 0); // no shift + desktop->getSelection()->move(mul*nudge, 0); // no shift } } @@ -971,15 +971,15 @@ bool SelectTool::root_handler(GdkEvent* event) { if (MOD__ALT(event)) { // alt if (MOD__SHIFT(event)) { - sp_selection_move_screen(desktop->getSelection(), 0, mul*-10); // shift + desktop->getSelection()->moveScreen(0, mul*-10); // shift } else { - sp_selection_move_screen(desktop->getSelection(), 0, mul*-1); // no shift + desktop->getSelection()->moveScreen(0, mul*-1); // no shift } } else { // no alt if (MOD__SHIFT(event)) { - sp_selection_move(desktop->getSelection(), 0, mul*-10*nudge); // shift + desktop->getSelection()->move(0, mul*-10*nudge); // shift } else { - sp_selection_move(desktop->getSelection(), 0, mul*-nudge); // no shift + desktop->getSelection()->move(0, mul*-nudge); // no shift } } @@ -1023,11 +1023,11 @@ bool SelectTool::root_handler(GdkEvent* event) { case GDK_KEY_bracketleft: if (MOD__ALT(event)) { gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_rotate_screen(selection, mul*1); + selection->rotateScreen(mul*1); } else if (MOD__CTRL(event)) { - sp_selection_rotate(selection, 90); + selection->rotate(90); } else if (snaps) { - sp_selection_rotate(selection, 180.0/snaps); + selection->rotate(180.0/snaps); } ret = TRUE; @@ -1036,11 +1036,11 @@ bool SelectTool::root_handler(GdkEvent* event) { case GDK_KEY_bracketright: if (MOD__ALT(event)) { gint mul = 1 + gobble_key_events(get_group0_keyval(&event->key), 0); // with any mask - sp_selection_rotate_screen(selection, -1*mul); + selection->rotateScreen(-1*mul); } else if (MOD__CTRL(event)) { - sp_selection_rotate(selection, -90); + selection->rotate(-90); } else if (snaps) { - sp_selection_rotate(selection, -180.0/snaps); + selection->rotate(-180.0/snaps); } ret = TRUE; @@ -1084,7 +1084,7 @@ bool SelectTool::root_handler(GdkEvent* event) { case GDK_KEY_g: case GDK_KEY_G: if (MOD__SHIFT_ONLY(event)) { - sp_selection_to_guides(desktop); + desktop->selection->toGuides(); ret = true; } break; -- cgit v1.2.3