branch | svghmi |
changeset 3001 | 003fd80ff0b8 |
parent 2936 | 53fb11263ff1 |
child 3004 | 705e34c6fe93 |
--- a/svghmi/widget_dropdown.ysl2 Mon Aug 03 16:32:23 2020 +0200 +++ b/svghmi/widget_dropdown.ysl2 Mon Aug 03 16:34:44 2020 +0200 @@ -38,9 +38,7 @@ // Called when a menu entry is clicked on_selection_click: function(selection) { this.close(); - let orig = this.indexes[0]; - let idx = this.offset ? orig - this.offset : orig; - apply_hmi_value(idx, selection); + apply_hmi_value(this.get_idx(0), selection); }, on_button_click: function() { this.open();