Skip to content

Two separate node drags are one undo step #538

Open

Description

@paceholder

Your idea

Make each drag of a node one undo step. Options:

  1. A drag counter in the command id. mouseReleaseEvent increments it.
  2. beginMacro and endMacro of QUndoStack around a drag.
  3. Keep it and document it.

I prefer option 1. It is the smallest change.

Tests:

  • Two separate drags are two undo steps.
  • One drag with many move events is one undo step.

Problem to be solved

MoveNodeCommand::mergeWith merges every move of the same nodes. Drag node A, release, drag A again: one undo reverts both drags. Users expect one undo step per drag.

Prior art

No response

Additional context

This is how it worked before. It was restored by the fix for #525 and #526.

Checklist

  • I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions