camunda / camunda-modeler

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

Avoid unnecessary firing of view.contentChanged events #1115

Open philippfromme opened 5 years ago

philippfromme commented 5 years ago

At the moment the DmnModeler fires an event triggering DmnEditor#viewsChanged whenever the current viewers command stack changes. Therefore this method is executed every single time the user models something. We should only trigger the method if the views change. There are two cases where there's really a change:

  1. The number of elements that can be viewed (dmn:Definitions or dmn:Decision) has changed.
  2. The name of an element has changed.

Related to https://github.com/bpmn-io/dmn-js/issues/388 Related to https://github.com/camunda/camunda-modeler/issues/1100

philippfromme commented 4 years ago

Will be fixed as part of camunda/camunda-modeler#1811.