From 8825db4e6132bada6cd86b93e6591aa3a53e86b7 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 26 Jun 2017 09:10:12 +0200 Subject: select-tool: Only stop the rubberband when it was started Rubberband::stop() calls SPCanvas::endForcedFullRedraws(), which means possible no full redraw will happen while moving. Fixes: https://bugs.launchpad.net/inkscape/+bug/1510704 Signed-off-by: Uli Schlachter --- 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 bae1793ed..927b8a3d4 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -566,7 +566,9 @@ bool SelectTool::root_handler(GdkEvent* event) { /* User has dragged fast, so we get events on root (lauris)*/ // not only that; we will end up here when ctrl-dragging as well // and also when we started within tolerance, but trespassed tolerance outside of item - Inkscape::Rubberband::get(desktop)->stop(); + if (Inkscape::Rubberband::get(desktop)->is_started()) { + Inkscape::Rubberband::get(desktop)->stop(); + } this->defaultMessageContext()->clear(); item_at_point = desktop->getItemAtPoint(Geom::Point(event->button.x, event->button.y), FALSE); -- cgit v1.2.3 From f55448431e934bf29bb9a983711d204614db7cc7 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 30 Jun 2017 05:58:14 +0200 Subject: Hackfest: Refactor cursors so the hot spot is inside the xpm --- src/ui/tools/select-tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 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 927b8a3d4..fca2173ca 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -81,7 +81,7 @@ sp_load_handles(int start, int count, char const **xpm) { SelectTool::SelectTool() // Don't load a default cursor - : ToolBase(NULL, 0, 0) + : ToolBase(NULL) , dragging(false) , moved(false) , button_press_shift(false) @@ -94,8 +94,8 @@ SelectTool::SelectTool() , _describer(NULL) { // cursors in select context - CursorSelectMouseover = sp_cursor_new_from_xpm(cursor_select_m_xpm , 1, 1); - CursorSelectDragging = sp_cursor_new_from_xpm(cursor_select_d_xpm , 1, 1); + CursorSelectMouseover = sp_cursor_from_xpm(cursor_select_m_xpm); + CursorSelectDragging = sp_cursor_from_xpm(cursor_select_d_xpm); // selection handles sp_load_handles(0, 2, handle_scale_xpm); -- cgit v1.2.3