From c0d17e0b9aeb4d309cb2f8ea6349e4572993c788 Mon Sep 17 00:00:00 2001 From: waplet Date: Wed, 19 Sep 2018 18:53:21 +0300 Subject: [PATCH] Adding 'Clear' button in watch stack toolbarItems --- front_end/sources/WatchExpressionsSidebarPane.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front_end/sources/WatchExpressionsSidebarPane.js b/front_end/sources/WatchExpressionsSidebarPane.js index 733509e4af9..c06dd8b5aa8 100644 --- a/front_end/sources/WatchExpressionsSidebarPane.js +++ b/front_end/sources/WatchExpressionsSidebarPane.js @@ -43,6 +43,8 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget { this._watchExpressions = []; this._watchExpressionsSetting = Common.settings.createLocalSetting('watchExpressions', []); + this._clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeicon-clear'); + this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._deleteAllButtonClicked.bind(this)); this._addButton = new UI.ToolbarButton(Common.UIString('Add expression'), 'largeicon-add'); this._addButton.addEventListener(UI.ToolbarButton.Events.Click, this._addButtonClicked.bind(this)); this._refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh'); @@ -63,7 +65,7 @@ Sources.WatchExpressionsSidebarPane = class extends UI.ThrottledWidget { * @return {!Array} */ toolbarItems() { - return [this._addButton, this._refreshButton]; + return [this._clearButton, this._addButton, this._refreshButton]; } /**