diff --git a/apps/documenteditor/main/app/view/PageMarginsDialog.js b/apps/documenteditor/main/app/view/PageMarginsDialog.js index 2cb7a2b045..c6e0bb85b0 100644 --- a/apps/documenteditor/main/app/view/PageMarginsDialog.js +++ b/apps/documenteditor/main/app/view/PageMarginsDialog.js @@ -285,9 +285,9 @@ define([ if (this.options.handler) { if (state == 'ok') { var errmsg = null; - if (this.spnLeft.getNumberValue() + this.spnRight.getNumberValue() > this.maxMarginsW ) + if (this.spnLeft.getNumberValue() + this.spnRight.getNumberValue() + (this.cmbGutterPosition.getValue() ? 0 : this.spnGutter.getNumberValue()) > this.maxMarginsW ) errmsg = this.txtMarginsW; - else if (Math.abs(this.spnTop.getNumberValue() + this.spnBottom.getNumberValue()) > this.maxMarginsH ) + else if (Math.abs(this.spnTop.getNumberValue() + this.spnBottom.getNumberValue() + (this.cmbGutterPosition.getValue() ? this.spnGutter.getNumberValue() : 0)) > this.maxMarginsH ) errmsg = this.txtMarginsH; if (errmsg) { Common.UI.warning({