aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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];
}