mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-08 09:49:51 +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) {
|
if (!renamed) {
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
[self refreshItemAtPath:path];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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 */
|
/* Python --> Cocoa */
|
||||||
- (void)refresh /* Override */
|
- (void)refresh /* Override */
|
||||||
{
|
{
|
||||||
|
@ -173,7 +173,7 @@ class PyResultOutline(PyOutline):
|
|||||||
|
|
||||||
@signature('c@:@')
|
@signature('c@:@')
|
||||||
def renameSelected_(self, newname):
|
def renameSelected_(self, newname):
|
||||||
return self.py.app.rename_selected(newname)
|
return self.py.rename_selected(newname)
|
||||||
|
|
||||||
@signature('v@:ic')
|
@signature('v@:ic')
|
||||||
def sortBy_ascending_(self, key, asc):
|
def sortBy_ascending_(self, key, asc):
|
||||||
|
@ -92,6 +92,12 @@ class ResultTree(GUIObject, Tree):
|
|||||||
else:
|
else:
|
||||||
return node.data[column]
|
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):
|
def root_children_counts(self):
|
||||||
# This is a speed optimization for cases where there's a lot of results so that there is
|
# 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.
|
# not thousands of children_count queries when expandAll is called.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user