Fixed reordering bug on load

This commit is contained in:
michael starke
2016-03-02 18:48:35 +01:00
parent 03d12b5461
commit 828d58d729
3 changed files with 13 additions and 13 deletions

View File

@@ -1,3 +1,3 @@
github "sparkle-project/Sparkle" ~> 1.13.1
github "mstarke/KeePassKit" "d7d64ef45f7785e0883e6257f852f9e08644a3f8"
github "mstarke/KeePassKit" "d8710185ff3c4f21c12f4c10eb68d570179c54ee"
github "mstarke/HNHUi" ~> 1.0

View File

@@ -1,3 +1,3 @@
github "mstarke/HNHUi" "1.0.1"
github "mstarke/KeePassKit" "d7d64ef45f7785e0883e6257f852f9e08644a3f8"
github "mstarke/KeePassKit" "d8710185ff3c4f21c12f4c10eb68d570179c54ee"
github "sparkle-project/Sparkle" "1.13.1"

View File

@@ -36,20 +36,20 @@
@implementation MPOutlineDataSource
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pasteboard {
if([items count] == 1) {
self.localDraggedGroup = nil; id item = [[items lastObject] representedObject];
if(![item isKindOfClass:[KPKGroup class]]) {
return NO;
}
KPKGroup *draggedGroup = item;
[pasteboard writeObjects:@[draggedGroup]];
return (nil != draggedGroup.parent);
if(items.count != 1) {
return NO;
}
return NO;
self.localDraggedGroup = nil; id item = [[items lastObject] representedObject];
if(![item isKindOfClass:[KPKGroup class]]) {
return NO;
}
KPKGroup *draggedGroup = item;
[pasteboard writeObjects:@[draggedGroup]];
return (nil != draggedGroup.parent);
}
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id<NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index {
/* Clean up our local search */
self.localDraggedEntry = nil;
self.localDraggedGroup = nil;
@@ -170,7 +170,7 @@
}
- (BOOL)_readDataFromPasteboard:(NSPasteboard *)pasteboard group:(KPKGroup **)group entry:(KPKEntry **)entry;{
if(entry == NULL || group == NULL) {
return NO; // Need valid pointers
}