Tool parameter settings are shared between multiple documents
Bug #1347055 reported by
Jabiertxof
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Low
|
Unassigned |
Bug Description
Pen/pencil modes -bezier, spiro and straights- are handled by a global preference shared between Inkscape instances.
So from 0.48 in advance if you have two or more instances, for example you can draw straight lines, when bezier toolbar button is selected.
Steps to reproduce:
Open two instances.
In one select straight lines
In other bezier ones.
In the straight instance draw a path.
Go to the other instance.
Now you have in the toolbar a bezier button selected but draw like you have selected straight button.
Changed in inkscape: | |
importance: | Undecided → Low |
status: | New → Triaged |
summary: |
- Pen/Pencil mode bug on multiple instances + Tool parameter settings are shared between multiple documents |
tags: |
added: freehand removed: pencil |
To post a comment you must log in.
I seem unable to come up with an elegant solution. Maybe this is a design flaw in how the tools are handled. Every time you switch the currently active tool, a new tool instance is created and the old one is destroyed.
If each window owned a set of tool instances that live as long as the window exists this wouldn't be a problem. Only on window creation every tool should read the prefs and when closing the window, every tool should write back its current state to the prefs. During window lifetime, a tool should only react to certain changes in the prefs (using the already existing PrefsObserver and the virtual set-method).
Currently, every change in a tool's settings is immediately written back to the prefs, e. g. in pencil-toolbar.cpp (sp_add_ freehand_ mode_toggle, freehand_ mode_changed) .
I'll try this out.