diff options
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 31 | ||||
-rw-r--r-- | Source/TableSource.m | 17 |
2 files changed, 15 insertions, 33 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index c746e56f..41a19ffd 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,7 +8,6 @@ <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="604"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6137,7 +6136,7 @@ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{560, 200}</string> <object class="NSView" key="NSWindowView" id="999543752"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">4370</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6586,29 +6585,6 @@ <object class="NSTextView" id="1011820278"> <reference key="NSNextResponder" ref="134546146"/> <int key="NSvFlags">2322</int> - <object class="NSMutableSet" key="NSDragTypes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="set.sortedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>Apple HTML pasteboard type</string> - <string>Apple PDF pasteboard type</string> - <string>Apple PICT pasteboard type</string> - <string>Apple PNG pasteboard type</string> - <string>Apple URL pasteboard type</string> - <string>CorePasteboardFlavorType 0x6D6F6F76</string> - <string>CorePasteboardFlavorType 0x75726C20</string> - <string>NSColor pasteboard type</string> - <string>NSFilenamesPboardType</string> - <string>NSStringPboardType</string> - <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string> - <string>NeXT RTFD pasteboard type</string> - <string>NeXT Rich Text Format v1.0 pasteboard type</string> - <string>NeXT TIFF v4.0 pasteboard type</string> - <string>NeXT font pasteboard type</string> - <string>NeXT ruler pasteboard type</string> - <string>WebURLsWithTitlesPboardType</string> - </object> - </object> <string key="NSFrameSize">{667, 14}</string> <reference key="NSSuperview" ref="134546146"/> <object class="NSTextContainer" key="NSTextContainer" id="609699272"> @@ -6746,7 +6722,6 @@ </object> </object> <string key="NSFrameSize">{667, 416}</string> - <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{560, 222}</string> @@ -25419,7 +25394,7 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <object class="IBToolTipAttribute" key="NS.object.0"> <string key="name">ToolTip</string> <reference key="object" ref="996552255"/> - <string key="toolTip">Delete selected field(s)</string> + <string type="base64-UTF8" key="toolTip">RGVsZXRlIHNlbGVjdGVkIGZpZWxkICjijKspA</string> </object> </object> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -25429,7 +25404,7 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string> <object class="IBToolTipAttribute" key="NS.object.0"> <string key="name">ToolTip</string> <reference key="object" ref="338754831"/> - <string type="base64-UTF8" key="toolTip">RHVwbGljYXRlIHNlbGVjdGVkIGZpZWxkICjijJhEKQ</string> + <string type="base64-UTF8" key="toolTip">RHVwbGljYXRlIHNlbGVjdGVkIG9yIGxhc3QgZmllbGQgZGVmaW5pdGlvbiAo4oyYRCk</string> </object> </object> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> diff --git a/Source/TableSource.m b/Source/TableSource.m index 6509fa24..91037469 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -77,7 +77,7 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab // Enable edit table button [editTableButton setEnabled:YES]; - + //query started [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self]; @@ -221,6 +221,11 @@ loads aTable, put it in an array, update the tableViewColumns and reload the tab [[tableSourceView enclosingScrollView] display]; [[tableSourceView enclosingScrollView] tile]; + // 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]; + //query finished [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self]; } @@ -266,8 +271,9 @@ reloads the table (performing a new mysql-query) { NSMutableDictionary *tempRow; - if ( ![tableSourceView numberOfSelectedRows] ) - return; + if ( ![tableSourceView numberOfSelectedRows] ) { + [tableSourceView selectRowIndexes:[NSIndexSet indexSetWithIndex:[tableSourceView numberOfRows]-1] byExtendingSelection:NO]; + } // Check whether a save of the current row is required. if ( ![self saveRowOnDeselect] ) return; @@ -1092,15 +1098,16 @@ would result in a position change. if ( isEditingRow && [tableSourceView selectedRow] != currentlyEditingRow ) { [self saveRowOnDeselect]; } + [copyFieldButton setEnabled:YES]; // check if there is currently a field selected // and change button state accordingly if ([tableSourceView numberOfSelectedRows] > 0 && [tablesListInstance tableType] == SP_TABLETYPE_TABLE) { [removeFieldButton setEnabled:YES]; - [copyFieldButton setEnabled:YES]; + // [copyFieldButton setEnabled:YES]; } else { [removeFieldButton setEnabled:NO]; - [copyFieldButton setEnabled:NO]; + // [copyFieldButton setEnabled:YES]; } } else if ([aNotification object] == indexView) { |