aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-05 01:02:53 +0000
committerrowanbeentje <rowan@beent.je>2009-03-05 01:02:53 +0000
commitf0830d96692e40eaa45bd5b9ae1322a391d905a7 (patch)
treea62b6ccc9d96deb6984fada3a149db3613dd8262 /Source/TablesList.m
parent04f87a1710d1379589c7e4d7e84cfbb9908ae468 (diff)
downloadsequelpro-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.m7
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;