Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo for DMN decision name direct editing doesnt work on first attempt #1912

Closed
MaxTru opened this issue Aug 10, 2020 · 4 comments
Closed

Undo for DMN decision name direct editing doesnt work on first attempt #1912

MaxTru opened this issue Aug 10, 2020 · 4 comments
Assignees
Labels
bug Something isn't working DMN
Milestone

Comments

@MaxTru
Copy link
Contributor

MaxTru commented Aug 10, 2020

Describe the Bug

Undo is not working when using direct edit to adjust a DMN decision name. After having performed multiple actions it works

Steps to Reproduce

  1. Open a new DMN DRD
  2. Edit the Decision name
  3. Try to undo
    labelEditingBug

Expected Behavior

Undo works

Environment

  • OS: Arch Manjaro Linux
  • Camunda Modeler Version: 4.1.1

Additional context
This belong to a series of undo bugs

@MaxTru MaxTru added the bug Something isn't working label Aug 10, 2020
@MaxTru MaxTru added the backlog Queued in backlog label Aug 11, 2020 — with bpmn-io-tasks
@MaxTru
Copy link
Contributor Author

MaxTru commented Aug 11, 2020

This bug only occurs after initial creation of a DMN DRD (and when then changing the name of the decision).

Problem seems to be that the commandStack tries to undo an elements.move command rather than the updateLabel.

@oguzeroglu
Copy link
Contributor

oguzeroglu commented Sep 8, 2020

It turns out that what triggers this problem is align-to-origin module. https://github.com/bpmn-io/align-to-origin/blob/34931362346878ea9eec9b248b646c6ba714adf2/lib/align-to-origin.js#L117

For some reason save XML action is trigger when the label editing is complete.

@oguzeroglu
Copy link
Contributor

One solution would be to register elements position to align-to-origin module on viewer creation so that we can have an early return here: https://github.com/bpmn-io/align-to-origin/blob/34931362346878ea9eec9b248b646c6ba714adf2/lib/align-to-origin.js#L94 since no delta would be computed.

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed backlog Queued in backlog labels Sep 9, 2020
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Sep 9, 2020
@oguzeroglu
Copy link
Contributor

Closed via #1935

@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Sep 9, 2020
@MaxTru MaxTru added this to the M42 milestone Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DMN
Projects
None yet
Development

No branches or pull requests

2 participants