diff options
author | rowanbeentje <rowan@beent.je> | 2009-03-05 01:02:53 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-03-05 01:02:53 +0000 |
commit | f0830d96692e40eaa45bd5b9ae1322a391d905a7 (patch) | |
tree | a62b6ccc9d96deb6984fada3a149db3613dd8262 /Source/TablesList.m | |
parent | 04f87a1710d1379589c7e4d7e84cfbb9908ae468 (diff) | |
download | sequelpro-f0830d96692e40eaa45bd5b9ae1322a391d905a7.tar.gz sequelpro-f0830d96692e40eaa45bd5b9ae1322a391d905a7.tar.bz2 sequelpro-f0830d96692e40eaa45bd5b9ae1322a391d905a7.zip |
Improves the table structure view to only save a row when properly deselected, and automatically reselecting the row for re-edit on error - resolves Issue #74.
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m index ad3c0217..e1122768 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -97,7 +97,7 @@ adds a new table to the tables-array (no changes in mysql-db) */ - (IBAction)addTable:(id)sender { - if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || + if ( ![tableSourceInstance saveRowOnDeselect] || ![tableContentInstance saveRowOnDeselect] || ![tableDocumentInstance database] ) return; @@ -151,7 +151,7 @@ copies a table, if desired with content if ( [tablesListView numberOfSelectedRows] != 1 ) return; - if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || ![tableContentInstance saveRowOnDeselect] ) + if ( ![tableSourceInstance saveRowOnDeselect] || ![tableContentInstance saveRowOnDeselect] ) return; [tableWindow endEditingFor:nil]; @@ -587,8 +587,7 @@ traps enter and esc and edit/cancel without entering next row //we have to be sure that TableSource and TableContent have finished editing // if ( ![tableSourceInstance addRowToDB] || ![tableContentInstance addRowToDB] ) { - if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || - ![tableContentInstance saveRowOnDeselect] ) { + if ( ![tableSourceInstance saveRowOnDeselect] || ![tableContentInstance saveRowOnDeselect] ) { return NO; } else { return YES; |