From 5698e7b63f0e187bb8b9d611cad4d6ec40412a4d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 5 Feb 2010 18:41:42 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20endless=20loop=20if=20user=20select?= =?UTF-8?q?s=20a=20table=20whose=20name=20contains=20chars=20which=20are?= =?UTF-8?q?=20not=20support=20by=20the=20current=20set=20encoding=20?= =?UTF-8?q?=E2=80=A2=20added=20DataMigrationDialog.xib=20to=20Xcode=20proj?= =?UTF-8?q?ect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TablesList.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/TablesList.m') diff --git a/Source/TablesList.m b/Source/TablesList.m index a81c6d75..2a9a7657 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -221,7 +221,10 @@ [tablesListView reloadData]; // if the previous selected table still exists, select it - if( previousSelectedTable != nil && [tables indexOfObject:previousSelectedTable] < [tables count]) { + // but not if the update was called from SPTableData since it calls that method + // if a selected table doesn't exist - this happens if a table was deleted/renamed by an other user + // or if the table name contains characters which are not supported by the current set encoding + if( ![sender isKindOfClass:[SPTableData class]] && previousSelectedTable != nil && [tables indexOfObject:previousSelectedTable] < [tables count]) { NSInteger itemToReselect = [tables indexOfObject:previousSelectedTable]; tableListIsSelectable = YES; [tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:itemToReselect] byExtendingSelection:NO]; -- cgit v1.2.3