mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Reduce the number of onUpdate events fired for dialog buttons (#16311)
This commit is contained in:
@@ -161,19 +161,10 @@ export class MainThreadModelViewDialog extends Disposable implements MainThreadM
|
||||
let button = this._buttons.get(handle);
|
||||
if (!button) {
|
||||
button = new DialogButton(details.label, details.enabled);
|
||||
button.position = details.position;
|
||||
button.hidden = details.hidden;
|
||||
button.secondary = details.secondary;
|
||||
button.onClick(() => this.onButtonClick(handle));
|
||||
this._buttons.set(handle, button);
|
||||
} else {
|
||||
button.label = details.label;
|
||||
button.enabled = details.enabled;
|
||||
button.hidden = details.hidden;
|
||||
button.focused = details.focused;
|
||||
button.position = details.position;
|
||||
button.secondary = details.secondary;
|
||||
}
|
||||
button.setProperties(details);
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user