jenkins-bot has submitted this change and it was merged. Change subject: Don't update image model twice ......................................................................
Don't update image model twice The image model is updated through events from the edit dialog. There is no need to update the states of the select/checkboxes at the end in 'apply'. The only inputs that are not updated on change are caption and alternate text. Bug: 65564 Change-Id: I18c009546120e270467418cff677ec491fd109ca --- M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js 1 file changed, 1 insertion(+), 12 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js index 1a10110..9c93638 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js @@ -526,21 +526,10 @@ 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 -- To view, visit https://gerrit.wikimedia.org/r/134660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I18c009546120e270467418cff677ec491fd109ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits