diff options
author | stuconnolly <stuart02@gmail.com> | 2008-11-30 01:08:53 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2008-11-30 01:08:53 +0000 |
commit | 7864bf91a63ad879ef1c6edc6a10b9dc1f932e12 (patch) | |
tree | fd07241b6022a8d194675cb6982acb39a8b60945 | |
parent | 0d78f56c2297bb01af558c9248c0233881e45bf6 (diff) | |
download | sequelpro-7864bf91a63ad879ef1c6edc6a10b9dc1f932e12.tar.gz sequelpro-7864bf91a63ad879ef1c6edc6a10b9dc1f932e12.tar.bz2 sequelpro-7864bf91a63ad879ef1c6edc6a10b9dc1f932e12.zip |
Fix for issue 53.
-rw-r--r-- | TableDocument.m | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/TableDocument.m b/TableDocument.m index f9805288..f3fe760a 100644 --- a/TableDocument.m +++ b/TableDocument.m @@ -1052,7 +1052,17 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa invoked before a query is performed */ { - [queryProgressBar startAnimation:self]; + // Only start the progress indicator is this document window is key. + // Because we are starting the progress indicator based on the notification + // of a query being started, we have to prevent other windows from + // starting theirs. The same is also true for the below hasPerformedQuery: + // method. + // + // This code should be removed. Updating user interface elements based on + // notifications is bad practice as notifications are global to the application. + if ([tableWindow isKeyWindow]) { + [queryProgressBar startAnimation:self]; + } } - (void)hasPerformedQuery:(NSNotification *)notification @@ -1060,7 +1070,9 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa invoked after a query has been performed */ { - [queryProgressBar stopAnimation:self]; + if ([tableWindow isKeyWindow]) { + [queryProgressBar stopAnimation:self]; + } } - (void)applicationWillTerminate:(NSNotification *)notification |