diff --git a/lib/features/modeling/cmd/UpdatePropertiesHandler.js b/lib/features/modeling/cmd/UpdatePropertiesHandler.js index 133675ad..6ddd2e63 100644 --- a/lib/features/modeling/cmd/UpdatePropertiesHandler.js +++ b/lib/features/modeling/cmd/UpdatePropertiesHandler.js @@ -87,6 +87,9 @@ UpdatePropertiesHandler.prototype.execute = function(context) { if (NAME in properties && element.label) { changed.push(element.label); + + // show the label + element.label.hidden = false; } // update properties diff --git a/test/spec/features/modeling/UpdatePropertiesSpec.js b/test/spec/features/modeling/UpdatePropertiesSpec.js index 4f4ebe1d..ada698c5 100644 --- a/test/spec/features/modeling/UpdatePropertiesSpec.js +++ b/test/spec/features/modeling/UpdatePropertiesSpec.js @@ -70,6 +70,22 @@ describe('features/modeling - update properties', function() { })); + it('setting name', inject(function(elementRegistry, modeling) { + + // given + var flowConnection = elementRegistry.get('SequenceFlow_4'); + + // when + modeling.updateProperties(flowConnection, { name: 'FOO BAR' }); + + // then + expect(flowConnection.businessObject.name).to.equal('FOO BAR'); + + // flow label is now shown + expect(flowConnection.label.hidden).to.be.false; + })); + + it('updating name', inject(function(elementRegistry, modeling) { // given @@ -96,6 +112,9 @@ describe('features/modeling - update properties', function() { // then expect(flowConnection.businessObject.name).not.to.be.defined; + + // flow label is now hidden + expect(flowConnection.label.hidden).to.be.true; }));