mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fixed renaming in results.
This commit is contained in:
parent
33d44d4d24
commit
c3a972d39b
@ -98,6 +98,9 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
if (!renamed) {
|
||||
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
||||
}
|
||||
else {
|
||||
[self refreshItemAtPath:path];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -139,6 +142,15 @@ http://www.hardcoded.net/licenses/hs_license
|
||||
}
|
||||
}
|
||||
|
||||
/* don't calls saveEdits and cancelEdits */
|
||||
- (void)outlineViewDidEndEditing:(HSOutlineView *)outlineView
|
||||
{
|
||||
}
|
||||
|
||||
- (void)outlineViewCancelsEdition:(HSOutlineView *)outlineView
|
||||
{
|
||||
}
|
||||
|
||||
/* Python --> Cocoa */
|
||||
- (void)refresh /* Override */
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ class PyResultOutline(PyOutline):
|
||||
|
||||
@signature('c@:@')
|
||||
def renameSelected_(self, newname):
|
||||
return self.py.app.rename_selected(newname)
|
||||
return self.py.rename_selected(newname)
|
||||
|
||||
@signature('v@:ic')
|
||||
def sortBy_ascending_(self, key, asc):
|
||||
|
@ -92,6 +92,12 @@ class ResultTree(GUIObject, Tree):
|
||||
else:
|
||||
return node.data[column]
|
||||
|
||||
def rename_selected(self, newname):
|
||||
node = self.selected_node
|
||||
node._data = None
|
||||
node._data_delta = None
|
||||
return self.app.rename_selected(newname)
|
||||
|
||||
def root_children_counts(self):
|
||||
# This is a speed optimization for cases where there's a lot of results so that there is
|
||||
# not thousands of children_count queries when expandAll is called.
|
||||
|
Loading…
x
Reference in New Issue
Block a user