Open in project directory preferentially if no last open dir (quick version, ignores file type).

This commit is contained in:
Riccardo Mottola 2021-02-12 08:45:16 +01:00
parent 6544ff872e
commit 209f71d692
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2021-02-12 Riccardo Mottola <rm@gnu.org>
* Framework/PCFileManager.m
Open in project directory preferentially if no last open
dir (quick version, ignores file type).
2021-02-06 Riccardo Mottola <rm@gnu.org>
* Modules/Editors/ProjectCenter/PCEditor.m

View file

@ -1,10 +1,11 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2011 Free Software Foundation
Copyright (C) 2000-2021 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
Riccardo Mottola
This file is part of GNUstep.
@ -416,6 +417,12 @@ static PCFileManager *_mgr = nil;
}
panel = addFilesPanel;
lastOpenDir = [prefs stringForKey:@"FileAddLastDirectory"];
if (lastOpenDir == nil)
{
PCProject *pr = [projectManager activeProject];
NSString *prPathRoot = [pr projectPath];
lastOpenDir = prPathRoot;
}
break;
default:
return nil;