aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-16 16:59:13 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-16 16:59:13 +0000
commit2328cfd33463381741f29b196e867fc87676b799 (patch)
tree5a12a54db7bd780d1b028276aa52fb870a25d120 /Source
parentbb6e7a78be7fbb801f611d32bdc7c45b9961bb7e (diff)
downloadsequelpro-2328cfd33463381741f29b196e867fc87676b799.tar.gz
sequelpro-2328cfd33463381741f29b196e867fc87676b799.tar.bz2
sequelpro-2328cfd33463381741f29b196e867fc87676b799.zip
• fixed: "Duplicate field" will be disabled explicitly if selected table is not a BASE TABLE
Diffstat (limited to 'Source')
-rw-r--r--Source/TableSource.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 91037469..0e57234b 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -223,8 +223,11 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab
// Enable 'Duplicate field' if at least one field is specified
// if no field is selected 'Duplicate field' will copy the last field
- if([tableSourceView numberOfRows] > 0)
- [copyFieldButton setEnabled:YES];
+ // Enable 'Duplicate field' only for tables!
+ if([tablesListInstance tableType] == SP_TABLETYPE_TABLE)
+ [copyFieldButton setEnabled:([tableSourceView numberOfRows] > 0)];
+ else
+ [copyFieldButton setEnabled:NO];
//query finished
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
@@ -1104,10 +1107,9 @@ would result in a position change.
// and change button state accordingly
if ([tableSourceView numberOfSelectedRows] > 0 && [tablesListInstance tableType] == SP_TABLETYPE_TABLE) {
[removeFieldButton setEnabled:YES];
- // [copyFieldButton setEnabled:YES];
} else {
[removeFieldButton setEnabled:NO];
- // [copyFieldButton setEnabled:YES];
+ [copyFieldButton setEnabled:NO];
}
}
else if ([aNotification object] == indexView) {