aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-03-26 13:23:48 +0000
committerstuconnolly <stuart02@gmail.com>2010-03-26 13:23:48 +0000
commit51da32fca71b30824a4679ecf876597a813b284f (patch)
tree46fbdc1306f27855d5bab202b803a87cad4f1b63
parent2c558dccc2235bfbd9c8f2114bbffa99c78c4af5 (diff)
downloadsequelpro-51da32fca71b30824a4679ecf876597a813b284f.tar.gz
sequelpro-51da32fca71b30824a4679ecf876597a813b284f.tar.bz2
sequelpro-51da32fca71b30824a4679ecf876597a813b284f.zip
Until it can be moved to it's own connection don't allow refreshing of the processes list whilst the document is performing a task to prevent connection lock errors. Related to issue #607.
-rw-r--r--Source/SPProcessListController.m15
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index 115f4a67..108b48e9 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -155,6 +155,10 @@
*/
- (IBAction)refreshProcessList:(id)sender
{
+ // If the document is currently performing a task (most likely threaded) on the current connection, don't
+ // allow a refresh to prevent connection lock errors.
+ if ([(TableDocument *)[connection delegate] isWorking]) return;
+
// Start progress Indicator
[refreshProgressIndicator startAnimation:self];
[refreshProgressIndicator setHidden:NO];
@@ -282,16 +286,7 @@
// Weak reference
processesFiltered = processes;
- // Get the current process list
- [self _getDatabaseProcessList];
-
- // Reload the tableview
- [processListTableView reloadData];
-
- // If the search field already has value from when the panel was previously open, apply the filter.
- if ([[filterProcessesSearchField stringValue] length] > 0) {
- [self _updateServerProcessesFilterForFilterString:[filterProcessesSearchField stringValue]];
- }
+ [self refreshProcessList:self];
[self showWindow:self];
}