show/hide other layers not properly recorded in undo history

Bug #1358520 reported by Formerly Kevin Yin, now disabled on 2014-08-18
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Low
jazzynico

Bug Description

Create a document with a few layers (for example, the attached). Open the undo history and layers dialog.

Right click on a layer and show/hide other layers. Then do it again for the same layer. Note that the undo history doesn't record the second time.

Seen on Inkscape 0.91 x64 on Windows 8.1.

Liam P. White (liampwhite) wrote :

Also verified with Inkscape 0.48.5 on Ubuntu Trusty.

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) wrote :

Match 'Importance' to similar earlier report concerning layer changes and undo history (bug #1256463).

Please comment if you disagree, or if this corrupts the undo history and can lead to crashes later on.

Changed in inkscape:
importance: Undecided → Medium
importance: Medium → Low
jazzynico (jazzynico) wrote :

From src/document-undo.cpp:

" * \verbatim
   void sp_document_done( SPDocument *document );
   void sp_document_maybe_done( SPDocument *document, const unsigned char *key ) \endverbatim
 *
 * Both move the recent action list into the undo stack and clear the
 * list afterwards. While the first method does an unconditional push,
 * the second one first checks the key of the most recent stack entry. If
 * the keys are identical, the current action list is appended to the
 * existing stack entry, instead of pushing it onto its own. This
 * behaviour can be used to collect multi-step actions (like winding the
 * Gtk spinbutton) from the UI into a single undoable step."

Thus calling DocumentUndo::done for SP_VERB_LAYER_SOLO and SP_VERB_LAYER_LOCK_OTHERS in verbs.cpp would add a different undo history entry each time the actions are performed instead of one (all actions can be undone with a single undo action) currently.

Changed in inkscape:
status: Confirmed → In Progress
assignee: nobody → jazzynico (jazzynico)
milestone: none → 0.91
jazzynico (jazzynico) wrote :

Patch attached.

Could you please test and confirm the new behavior is correct?

jazzynico (jazzynico) wrote :

Fix committed revision 13572.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico) on 2015-02-14
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers