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:
The number of elements that can be viewed (dmn:Definitions or dmn:Decision) has changed.
At the moment the
DmnModeler
fires an event triggeringDmnEditor#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:dmn:Definitions
ordmn:Decision
) has changed.Related to https://github.com/bpmn-io/dmn-js/issues/388 Related to https://github.com/camunda/camunda-modeler/issues/1100