Inherit project folder when moving document to new window

This only happens if the document being moved is a child of the project folder.
This commit is contained in:
Allan Odgaard
2014-08-27 12:46:12 +02:00
parent 5a45023f9e
commit 542158c9f0

View File

@@ -1577,6 +1577,8 @@ namespace
{
DocumentController* controller = [DocumentController new];
controller.documents = make_vector(documents[0]);
if(path::is_child(documents[0]->path(), to_s(self.projectPath)))
controller.defaultProjectPath = self.projectPath;
[controller openAndSelectDocument:documents[0]];
[controller showWindow:self];
[self closeTabsAtIndexes:indexSet askToSaveChanges:NO createDocumentIfEmpty:YES];