diff options
author | bamse16 <marius@marius.me.uk> | 2009-03-22 11:31:01 +0000 |
---|---|---|
committer | bamse16 <marius@marius.me.uk> | 2009-03-22 11:31:01 +0000 |
commit | c47c587237171476a97e981ca6db1058edfc5c60 (patch) | |
tree | a3fe858dc636d10efd039e12931303d8b1aabe7d /Source/SPTableData.m | |
parent | 06fc18fcd75a693d82243e7e81510fa5b05b450f (diff) | |
download | sequelpro-c47c587237171476a97e981ca6db1058edfc5c60.tar.gz sequelpro-c47c587237171476a97e981ca6db1058edfc5c60.tar.bz2 sequelpro-c47c587237171476a97e981ca6db1058edfc5c60.zip |
Issue #201 Duplicating a row resets values of text/blob fields in the new row
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r-- | Source/SPTableData.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 1391e355..ae5f1b2f 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -130,6 +130,24 @@ return [columns objectAtIndex:index]; } +/* + * Checks if this column is type text or blob. + * Used to determine if we have to show a popup when we edit a value from this column. + */ + +- (BOOL) columnIsBlobOrText:(NSString *)colName +{ + if ([columns count] == 0) { + if ([tableListInstance tableType] == SP_TABLETYPE_VIEW) { + [self updateInformationForCurrentView]; + } else { + [self updateInformationForCurrentTable]; + } + } + + return (BOOL) ([[[self columnWithName:colName] objectForKey:@"typegrouping"] isEqualToString:@"textdata" ] || [[[self columnWithName:colName] objectForKey:@"typegrouping"] isEqualToString:@"blobdata"]); +} + /* * Retrieve the table status value for a supplied key, using or refreshing the cache as appropriate. |