diff --git a/cocoa/base/ResultOutline.m b/cocoa/base/ResultOutline.m index 2b90d265..db4db114 100644 --- a/cocoa/base/ResultOutline.m +++ b/cocoa/base/ResultOutline.m @@ -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 */ { diff --git a/core/app_cocoa_inter.py b/core/app_cocoa_inter.py index 4a25b34b..2c95bfd9 100644 --- a/core/app_cocoa_inter.py +++ b/core/app_cocoa_inter.py @@ -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): diff --git a/core/gui/result_tree.py b/core/gui/result_tree.py index e726aeb9..e1e60246 100644 --- a/core/gui/result_tree.py +++ b/core/gui/result_tree.py @@ -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.