From 253ba83ed2dfb71fa8a54ee6b6170591789a2156 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Tue, 9 Apr 2013 20:35:08 +0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20suppress=20file=20browser=20upd?= =?UTF-8?q?ates=20when=20showing=20field=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reload was suppressed because there is no good way to reload a table view when the field editor contains uncommitted changes. I decided it’s probably better to lose these changes than show stale content, as for example the change might remove the item being edited, as would be the case when undoing New Document or New Folder. Closes #886. --- Frameworks/OakFileBrowser/src/FSOutlineViewDelegate.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Frameworks/OakFileBrowser/src/FSOutlineViewDelegate.mm b/Frameworks/OakFileBrowser/src/FSOutlineViewDelegate.mm index d09a24f9..df8caff4 100644 --- a/Frameworks/OakFileBrowser/src/FSOutlineViewDelegate.mm +++ b/Frameworks/OakFileBrowser/src/FSOutlineViewDelegate.mm @@ -343,7 +343,10 @@ static NSSet* VisibleItems (NSOutlineView* outlineView, FSItem* root, NSMutableS --itemsReloading; if([outlineView editedRow] != -1) - return; // FIXME Queue reload while editing a cell + { + self.pendingEditURL = [[outlineView itemAtRow:[outlineView editedRow]] url]; + [outlineView cancelOperation:self]; // TODO Grab the field editor’s string value and restore later + } if(recursive) {