From 8e47976d6da0c84ca25b93cd571725be49975ee1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 23 Jul 2020 19:14:58 +0300 Subject: [PATCH] [DE] Fix changing autocorrect list --- apps/common/main/lib/view/AutoCorrectDialog.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index d88681da8..0ee67130e 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -154,14 +154,14 @@ define([ } }); if (_selectedItem) { - me.mathList.selectRecord(_selectedItem, true); - me.mathList.scrollToRecord(_selectedItem); - } else { - me.mathList.deselectAll(); + me.mathList.scrollToRecord(_selectedItem, true); + if (_selectedItem.get('replaced') == value) + me.mathList.selectRecord(_selectedItem, true); + else + _selectedItem = null; } - } else { - me.mathList.deselectAll(); } + (!_selectedItem) && me.mathList.deselectAll(); me.updateControls(_selectedItem); }); @@ -226,7 +226,7 @@ define([ this.btnEdit.setDisabled(!this.inputBy.getValue() || this.inputBy.getValue() === rec.get('by')); } else { this.btnDelete.setCaption(this.textDelete); - this.btnDelete.setCaption(this.textDelete); + this.btnEdit.setDisabled(!this.inputBy.getValue()); } this.btnDelete.setDisabled(!rec); this.btnEdit.setCaption(rec ? this.textEdit : this.textAdd);