From ae8a5dc330390293034e41280414024035192b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souk=C3=A9ina=20Bojabza?= Date: Wed, 5 Oct 2022 08:06:58 +0000 Subject: [PATCH] [IMP] web_editor: remove the temporary fix for the history of the grids Since the merge of [1], the undo/redo of a resizing is made in one go and not in multiple steps. The row count of the grids are therefore correctly updated at each undo/redo operation. This commit removes the temporary fix made in [2] to always have the correct row count when undoing/redoing, as it is not necessary anymore. [1]: https://github.com/odoo/odoo/commit/423f4bd2a6cc47e69699d2437eaa5acda94bb98d [2]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec task-2973198 X-original-commit: 43d2e588c93b3dc5750eae564c7296159f40c413 Part-of: odoo/odoo#102525 --- .../static/src/js/editor/snippets.editor.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index dae34100096..1e97e19f27d 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -4050,24 +4050,12 @@ var SnippetsMenu = Widget.extend({ */ _onUndo: async function () { this.options.wysiwyg.undo(); - // Resizing all the grids. - // TODO maybe to remove when history will be fixed. - const $gridModeRows = this.getEditableArea().find('.row.o_grid_mode'); - for (const rowEl of $gridModeRows) { - gridUtils._resizeGrid(rowEl); - } }, /** * Redo. */ _onRedo: async function () { this.options.wysiwyg.redo(); - // Resizing all the grids. - // TODO maybe to remove when history will be fixed. - const $gridModeRows = this.getEditableArea().find('.row.o_grid_mode'); - for (const rowEl of $gridModeRows) { - gridUtils._resizeGrid(rowEl); - } }, /** * @private