Prevent the debugger controls being pressed again before previous processing is complete. Fixes #3734

Note that this needs to be re-visited in the future, as the current fix is somewhat hacky.
This commit is contained in:
Akshay Joshi 2018-11-20 16:35:27 +00:00 committed by Dave Page
parent 8b5abdfa8f
commit 05e067035f
2 changed files with 27 additions and 18 deletions

View File

@ -19,6 +19,7 @@ Bug fixes
| `Bug #3029 <https://redmine.postgresql.org/issues/3029>`_ - Allow the selection order to be preserved in the Select2 control to fix column ordering in data Import/Export.
| `Bug #3629 <https://redmine.postgresql.org/issues/3629>`_ - Allow use of 0 (integer) and empty strings as parameters in the debugger.
| `Bug #3723 <https://redmine.postgresql.org/issues/3723>`_ - Properly report errors when debugging cannot be started.
| `Bug #3734 <https://redmine.postgresql.org/issues/3734>`_ - Prevent the debugger controls being pressed again before previous processing is complete.
| `Bug #3736 <https://redmine.postgresql.org/issues/3736>`_ - Fix toggle breakpoints buttons in the debugger.
| `Bug #3742 <https://redmine.postgresql.org/issues/3742>`_ - Fix changes to the NOT NULL and default value options in the Table Dialogue.
| `Bug #3746 <https://redmine.postgresql.org/issues/3746>`_ - Fix dropping of multiple functions/procedures at once.

View File

@ -391,12 +391,15 @@ define([
}
// Enable all the buttons as we got the results
self.enable('stop', true);
self.enable('step_over', true);
self.enable('step_into', true);
self.enable('continue', true);
self.enable('toggle_breakpoint', true);
self.enable('clear_all_breakpoints', true);
// TODO: Fix this properly so a timeout isn't required.
setTimeout(function() {
self.enable('stop', true);
self.enable('step_over', true);
self.enable('step_into', true);
self.enable('continue', true);
self.enable('toggle_breakpoint', true);
self.enable('clear_all_breakpoints', true);
}, 500);
}
} else if (res.data.status === 'Busy') {
pgTools.DirectDebug.polling_timeout_idle = true;
@ -519,12 +522,15 @@ define([
// Execution completed so disable the buttons other than
// "Continue/Start" button because user can still
// start the same execution again.
self.enable('stop', false);
self.enable('step_over', false);
self.enable('step_into', false);
self.enable('toggle_breakpoint', false);
self.enable('clear_all_breakpoints', false);
self.enable('continue', true);
setTimeout(function() {
self.enable('stop', false);
self.enable('step_over', false);
self.enable('step_into', false);
self.enable('toggle_breakpoint', false);
self.enable('clear_all_breakpoints', false);
self.enable('continue', true);
}, 500);
// Stop further polling
pgTools.DirectDebug.is_polling_required = false;
} else {
@ -550,12 +556,14 @@ define([
// Execution completed so disable the buttons other than
// "Continue/Start" button because user can still
// start the same execution again.
self.enable('stop', false);
self.enable('step_over', false);
self.enable('step_into', false);
self.enable('toggle_breakpoint', false);
self.enable('clear_all_breakpoints', false);
self.enable('continue', true);
setTimeout(function() {
self.enable('stop', false);
self.enable('step_over', false);
self.enable('step_into', false);
self.enable('toggle_breakpoint', false);
self.enable('clear_all_breakpoints', false);
self.enable('continue', true);
}, 500);
// Stop further pooling
pgTools.DirectDebug.is_polling_required = false;