trunk: switch from gradient to dropper tool loses gradient stop selection (rev >= 12532)

Bug #1239131 reported by su_v
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Markus Engel

Bug Description

Steps to reproduce:
1) launch inkscape (default prefs, default new doc)
2) draw two shapes, assign different fill colors
3) switch to gradient tool (keyboard shortcut 'g')
4) add linear gradient to one of the shapes (double-click with gradient tool)
5) select the end stop of the linear gradient
6) switch to the dropper tool (keyboard shortcut: 'd')
7) pick the fill color of the other object

Expected result:
The gradient stop(s) selected with the gradient tool is (are) still active in the dropper tool context; any picked color is immediately applied to the selected stop(s) of the gradient.

Actual result:
Upon tool switch, the selection of gradient stop(s) is lost, and any picked color is applied to the object itself (thus actually removing the gradient).

Workaround:
To achieve the intended result, the user needs to again select the gradient stops which need to be modified to use a color picked from other objects on-canvas, this time with the dropper tool, and then pick a color to be assigned to the selected stop(s).

Confirmed with r12678 on OS X 10.7.5 and r12677 on Ubuntu 13.04 (inkscape-trunk PPA)

Based on tests with archived builds:
- not reproduced with rev <= 12531
- reproduced with rev >= 12532
this changed behavior was introduced with the merge of the C++-ification branch in rev 12532:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12532>

Revision history for this message
su_v (suv-lp) wrote :

@Markus - here's another one which (hopefully) isn't that difficult to fix ;)

Changed in inkscape:
assignee: nobody → Markus Engel (engelmarkus)
description: updated
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape trunk revision 12686.

Changed in inkscape:
status: New → Triaged
su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Markus Engel (engelmarkus) wrote :

This has got to do with the way the tools are switched again. The attached patch should fix this. I hope this doesn't break fast tool-switching again.
Btw, are you still able to reproduce these crashes when rapidly pressing the d key in gtk3-based builds?

Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
su_v (suv-lp) wrote :

On 2013-10-27 01:53 +0200, Markus Engel wrote:
> Btw, are you still able to reproduce these crashes when rapidly
> pressing the d key in gtk3-based builds?

The crash mentioned in this thread on inkscape-devel?
<http://inkscape.13.x6.nabble.com/GObject-removal-branch-tt4967572.html#a4967582>
I haven't checked since then, but will do and file a report if I still can reproduce them.

Revision history for this message
su_v (suv-lp) wrote :

Patch tested successfully with r12729 on OS X 10.7.5.

Revision history for this message
Markus Engel (engelmarkus) wrote :

Fixed in r12730.

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

@Markus - the fix for this bug seems to introduce a regression:
- Bug #1258815 “crash after using Edit nodes icon twice”
  <https://bugs.launchpad.net/inkscape/+bug/1258815>

That crash does not happen if I revert the changes from r12730 in current trunk like this:

=== modified file 'src/desktop.cpp'
--- src/desktop.cpp 2013-11-12 01:48:38 +0000
+++ src/desktop.cpp 2013-12-08 12:35:22 +0000
@@ -661,6 +661,7 @@
  Inkscape::UI::Tools::ToolBase* new_tool = ToolFactory::instance().createObject(toolName);
  new_tool->desktop = this;
  new_tool->message_context = new Inkscape::MessageContext(this->messageStack());
+ new_tool->setup();

     Inkscape::UI::Tools::ToolBase* old_tool = event_context;
  event_context = new_tool;
@@ -670,8 +671,6 @@
   delete old_tool;
  }

- new_tool->setup();
-
     // Make sure no delayed snapping events are carried over after switching tools
     // (this is only an additional safety measure against sloppy coding, because each
     // tool should take care of this by itself)

su_v (suv-lp)
Changed in inkscape:
milestone: 0.91 → none
Revision history for this message
su_v (suv-lp) wrote :

On 2013-10-27 01:53 +0100, Markus Engel wrote:
> I hope this doesn't break fast tool-switching again. Btw, are you
> still able to reproduce these crashes when rapidly pressing the d key
> in gtk3-based builds?

@Markus - the fix for this bug seems to actually break fast tool-switching:
- Bug #1265376 “crash, draw path/shape, press the spacebar quickly”
  <https://bugs.launchpad.net/inkscape/+bug/1265376>

The crash reported in bug #1265376 is very similar to the one I experienced with earlier with those GTK3 builds (it was also with the <spacebar> tool-switch, not 'd'):

> 1) launch inkscape (default prefs)
> 2) switch to the text tool (use keyboard shortcut 'T')
> (do not click on the canvas yet)
> 3) tap <space> once to switch tools (last used tool <-> select tool)
> 4) repeat step 3 a couple of times
<http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/41022/focus=41032>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.