4xx / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Pencil Tool and Line Tool seem to get irrevocably disabled #1137

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In the main menu, select "Open Image" and open the attached file (file.svg).
2. Using the Select Tool, click the red rectangle.  Note that the Pencil Tool 
and Line Tool are now disabled.

What is the expected output? What do you see instead?

There doesn't seem to be any way to re-enable the Pencil Tool and Line Tool.  
Clicking outside the rectangle de-selects the rectangle but the Pencil Tool and 
Line Tool are still disabled.  Even if another image is opened, the Pencil Tool 
and Line Tool are still disabled.

In what browser did you experience this problem? (ALL, Firefox, Opera, etc)

The problem occurs in all browsers I tested (Firefox, Chrome, Internet 
Explorer).

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc)

Latest trunk (r2524).

Original issue reported on code.google.com by e...@siliconforks.com on 2 Sep 2013 at 12:38

Attachments:

GoogleCodeExporter commented 9 years ago
Upon further investigation, I see that this is actually intended behavior: 
selecting the rectangle changes the stroke color (essentially a global value), 
which in turn disables the Pencil Tool and Line Tool.

I still think this is confusing, however; e.g., Inkscape does not do it this 
way (in Inkscape, selecting an object will temporarily display the stroke and 
fill color of that object as long as it is selected, but this does not change 
the current fill and stroke color which was set by the user).

Original comment by e...@siliconforks.com on 10 Sep 2013 at 10:32

GoogleCodeExporter commented 9 years ago
I found at least one code path where the current behavior does not work at all:

1. Open the file (file.svg) as in the original report.
2. Select the rectangle.  (The stroke color are changed at this point to 
transparent, and the Pencil Tool and Line Tool are disabled.)
3. Now, change the color by clicking on the button with id="tool_stroke".  (Do 
not change the color by shift+click on the palette - that works differently.)  
The Pencil Tool and Line Tool should be re-enabled, but they are not.

See attached file for a suggested patch.

Original comment by e...@siliconforks.com on 11 Sep 2013 at 2:13

Attachments: