mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-23 07:01:39 +00:00
Improved delta values to support non-numerical values
Delta values now work for non-numerical values. Any column, when its value differs from its ref, becomes orange. A column that was already a "delta column" keeps its previous behavior (dupe cells for these columns are always displayed in orange). Sorting behavior, when Dupes Only and Delta Values are enabled at the same time, has also been extended to non-numerical values, making it easy to mass-mark dupe rows with orange values. Documentation was updated, unit tests were added. Fixes #213
This commit is contained in:
@@ -13,7 +13,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
@interface ResultTable : HSTable <QLPreviewPanelDataSource, QLPreviewPanelDelegate>
|
||||
{
|
||||
NSSet *_deltaColumns;
|
||||
}
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTableView *)aTableView;
|
||||
- (PyResultTable *)model;
|
||||
|
||||
@@ -20,16 +20,9 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTableView *)aTableView
|
||||
{
|
||||
self = [super initWithPyRef:aPyRef wrapperClass:[PyResultTable class] callbackClassName:@"ResultTableView" view:aTableView];
|
||||
_deltaColumns = [[NSSet setWithArray:[[self model] deltaColumns]] retain];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_deltaColumns release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (PyResultTable *)model
|
||||
{
|
||||
return (PyResultTable *)model;
|
||||
@@ -132,10 +125,8 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
color = [NSColor selectedTextColor];
|
||||
}
|
||||
else if (isMarkable) {
|
||||
if ([self deltaValuesMode]) {
|
||||
if ([_deltaColumns containsObject:[column identifier]]) {
|
||||
color = [NSColor orangeColor];
|
||||
}
|
||||
if ([[self model] isDeltaAtRow:row column:[column identifier]]) {
|
||||
color = [NSColor orangeColor];
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user