Skip to content

Commit

Permalink
Macros: Add handler for run button
Browse files Browse the repository at this point in the history
  • Loading branch information
Basher0303 committed Dec 6, 2024
1 parent a1d0f96 commit 800ef53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/common/main/lib/view/MacrosDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ define([], function () {
cls: 'btn-toolbar borders--small',
iconCls: 'icon toolbar__icon btn-run',
hint: this.tipMacrosRun
});
}).on('click', _.bind(this.onRunMacros, this));

this.btnMacrosAdd = new Common.UI.Button({
parentEl: $('#btn-macros-add'),
cls: 'btn-toolbar borders--small',
Expand Down Expand Up @@ -260,7 +261,10 @@ define([], function () {
var selectedItem = me._state.currentElementMode === me.CurrentElementModeType.Macros
? me.listMacros.getSelectedRec()
: me.listFunctions.getSelectedRec();
selectedItem && selectedItem.set('value', value);
if(selectedItem) {
me._state.currentValue = value;
selectedItem.set('value', value);
}
});
this.codeEditor.on('mouseup', function(x, y) {
if (me.binding.dragStop) me.binding.dragStop();
Expand Down

0 comments on commit 800ef53

Please sign in to comment.