From dd40a46fe351ea0bf8603b6125a9560acca3c581 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 8 Nov 2018 10:58:53 +0300 Subject: [PATCH] Fix bug: setEndPointHistory without setStartPointHistory --- apps/documenteditor/main/app/view/ShapeSettings.js | 12 ++++++++---- apps/documenteditor/main/app/view/TextArtSettings.js | 12 ++++++++---- .../main/app/view/ShapeSettings.js | 12 ++++++++---- .../main/app/view/SlideSettings.js | 6 ++++-- .../main/app/view/TextArtSettings.js | 12 ++++++++---- .../spreadsheeteditor/main/app/controller/Toolbar.js | 6 +++--- .../spreadsheeteditor/main/app/view/ShapeSettings.js | 12 ++++++++---- .../main/app/view/TextArtSettings.js | 12 ++++++++---- 8 files changed, 55 insertions(+), 29 deletions(-) diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 9982d3d26..c39041591 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -376,8 +376,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -515,8 +517,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/documenteditor/main/app/view/TextArtSettings.js b/apps/documenteditor/main/app/view/TextArtSettings.js index a457032aa..0378d8567 100644 --- a/apps/documenteditor/main/app/view/TextArtSettings.js +++ b/apps/documenteditor/main/app/view/TextArtSettings.js @@ -242,8 +242,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -381,8 +383,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index cf5597b06..6347cb8a2 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -361,8 +361,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -496,8 +498,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index 91a6b76dc..e4b639db5 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -572,8 +572,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/presentationeditor/main/app/view/TextArtSettings.js b/apps/presentationeditor/main/app/view/TextArtSettings.js index 64e9dfaf3..157c33695 100644 --- a/apps/presentationeditor/main/app/view/TextArtSettings.js +++ b/apps/presentationeditor/main/app/view/TextArtSettings.js @@ -363,8 +363,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -502,8 +504,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 4a1d45c35..e3c900667 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3086,7 +3086,7 @@ define([ tab = {action: 'pivot', caption: me.textPivot}; $panel = me.getApplication().getController('PivotTable').createToolbarPanel(); if ($panel) { - me.toolbar.addTab(tab, $panel, 4); + me.toolbar.addTab(tab, $panel, 3); me.toolbar.setVisible('pivot', true); } } @@ -3094,7 +3094,7 @@ define([ var tab = {action: 'review', caption: me.toolbar.textTabCollaboration}; var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel(); if ( $panel ) - me.toolbar.addTab(tab, $panel, 5); + me.toolbar.addTab(tab, $panel, 4); if ( config.isDesktopApp ) { // hide 'print' and 'save' buttons group and next separator @@ -3111,7 +3111,7 @@ define([ tab = {action: 'protect', caption: me.toolbar.textTabProtect}; $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel(); if ($panel) - me.toolbar.addTab(tab, $panel, 6); + me.toolbar.addTab(tab, $panel, 5); } } } diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index ecc89e8a8..93d13b89a 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -372,8 +372,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -511,8 +513,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; }, diff --git a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js index 291ae67a6..7b716ac38 100644 --- a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js @@ -364,8 +364,10 @@ define([ onTransparencyChangeComplete: function(field, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = newValue; - this.api.setEndPointHistory(); - this._transparencyApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._transparencyApplyFunc(); + } this._sendUndoPoint = true; }, @@ -503,8 +505,10 @@ define([ onGradientChangeComplete: function(slider, newValue, oldValue){ clearInterval(this.updateslider); this._sliderChanged = true; - this.api.setEndPointHistory(); - this._gradientApplyFunc(); + if (!this._sendUndoPoint) { // start point was added + this.api.setEndPointHistory(); + this._gradientApplyFunc(); + } this._sendUndoPoint = true; },