summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-01-31 10:10:58 +0100
committerDamiano Galassi <[email protected]>2018-01-31 10:10:58 +0100
commitf26b2624aef71e73bb189aee06296237abd97e82 (patch)
tree1c4a717b82106e897439b89817e69d35de691f0c /macosx
parenteb78c4a667f2923393afccd8b68c9f8f9bb07e25 (diff)
MacGui: fix the queue job descriptions cache.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBQueueController.m11
1 files changed, 8 insertions, 3 deletions
diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m
index db6cfe481..4b37640cb 100644
--- a/macosx/HBQueueController.m
+++ b/macosx/HBQueueController.m
@@ -391,13 +391,18 @@
[self.jobs beginTransaction];
[self.outlineView beginUpdates];
- NSArray *removeJobs = [self.jobs objectsAtIndexes:indexes];
+ NSArray<HBJob *> *removeJobs = [self.jobs objectsAtIndexes:indexes];
if (self.jobs.count > indexes.lastIndex)
{
[self.jobs removeObjectsAtIndexes:indexes];
}
+ for (HBJob *job in removeJobs)
+ {
+ [self.descriptions removeObjectForKey:job.uuid];
+ }
+
[self.outlineView removeItemsAtIndexes:indexes inParent:nil withAnimation:NSTableViewAnimationSlideUp];
[self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:indexes.firstIndex] byExtendingSelection:NO];
@@ -1523,12 +1528,12 @@
if ([tableColumn.identifier isEqualToString:@"desc"])
{
HBJob *job = item;
- NSAttributedString *description = self.descriptions[@(job.hash)];
+ NSAttributedString *description = self.descriptions[job.uuid];
if (description == nil)
{
description = job.attributedDescription;
- self.descriptions[@(job.hash)] = description;
+ self.descriptions[job.uuid] = description;
}
return description;