Reviewed-by: Dominik Csapak <d.csa...@proxmox.com>
On 7/15/25 16:31, Aaron Lauterer wrote:
This makes targeting the undo button more stable in situations where it might not be the 0 indexed item in the tools. Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> --- src/panel/RRDChart.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js index 3b41ae6..f9a9b33 100644 --- a/src/panel/RRDChart.js +++ b/src/panel/RRDChart.js @@ -152,7 +152,7 @@ Ext.define('Proxmox.widget.RRDChart', { return; } // if the undo button is disabled, disable our tool - let ourUndoZoomButton = chart.header.tools[0]; + let ourUndoZoomButton = chart.lookupReference('undoButton'); let undoButton = chart.interactions[0].getUndoButton(); ourUndoZoomButton.setDisabled(undoButton.isDisabled()); }, @@ -269,6 +269,7 @@ Ext.define('Proxmox.widget.RRDChart', { me.addTool({ type: 'minus', disabled: true, + reference: 'undoButton', tooltip: gettext('Undo Zoom'), handler: function () { let undoButton = me.interactions[0].getUndoButton();
_______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel