Merge "Don't update image model twice"

This commit is contained in:
jenkins-bot 2014-05-21 19:23:55 +00:00 committed by Gerrit Code Review
commit a66c3147cb

View file

@ -526,22 +526,11 @@ ve.ui.MWMediaEditDialog.prototype.applyChanges = function () {
this.imageModel.setAltText(
this.altTextInput.getValue()
);
this.imageModel.setCaptionDocument(
this.captionSurface.getSurface().getModel().getDocument()
);
if ( this.typeInput.getSelectedItem() ) {
this.imageModel.setType(
this.typeInput.getSelectedItem().getData()
);
}
if ( this.positionCheckbox.getValue() && this.positionInput.getSelectedItem() ) {
this.imageModel.setAlignment(
this.positionInput.getSelectedItem().getData()
);
}
this.imageModel.toggleBorder( this.borderCheckbox.getValue() );
// Check if the image node changed from inline to block or
// vise versa
if ( this.mediaNode.type !== this.imageModel.getImageNodeType() ) {