camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 476 forks source link

Unsaved Changes Lost When Switching Back and Forth between Tabs #1347

Closed jwhoeche closed 5 years ago

jwhoeche commented 5 years ago

Description

When I open a new diagramm the changes in my first diagramm are undone. All diagramms that are opened in XML View are reloaded and all changes are removed.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open a diagramm (or create a diagramm)
  2. Change something in the diagramm
  3. Switch to XML View of the diagramm
  4. Create a new diagramm (File -> new File -> ... or Cntl +T have the same effect)
  5. Go back to the first diagramm (all changes are undone)

Expected Behavior

When I open a new diagramm the other diagrammes should not be changed.

Environment

philippfromme commented 5 years ago

I can reproduce this. Thanks for letting us know. We'll fix this ASAP.

fail-compressed

philippfromme commented 5 years ago

The bug appears as soon as the sheet of a tab is switched with unsaved changes.

foobar

philippfromme commented 5 years ago

This bug was introduced by fixing https://github.com/camunda/camunda-modeler/issues/1318. Now that every time the xml prop passed from App to MultiSheetTab through EditorTab changes the cached lastXML property of MultiSheetTab is overridden the up-to-date XML that was cached after switching sheets will be replaced by the outdated XML passed to MultiSheetTab.

nikku commented 5 years ago

Closed via https://github.com/camunda/camunda-modeler/pull/1356.

nikku commented 5 years ago

Released as v3.1.0