From 51da32fca71b30824a4679ecf876597a813b284f Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 26 Mar 2010 13:23:48 +0000 Subject: 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. --- Source/SPProcessListController.m | 15 +++++---------- 1 file 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]; } -- cgit v1.2.3