mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 21:41:02 +00:00
Fix initial folder for File > Save with the last one visited (fix #3996)
Regression added in 056073b3f1a7d54cdf9a113110f50947b9b4d525 in the custom file selector. Every time you saved a new sprite the dialog started at the root path (e.g. Desktop) instead of the last used directory.
This commit is contained in:
parent
4b716255e8
commit
6c34be5eb6
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
// Copyright (C) 2019-2023 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -411,13 +411,9 @@ bool FileSelector::show(
|
|||||||
fs->refresh();
|
fs->refresh();
|
||||||
|
|
||||||
// We have to find where the user should begin to browse files
|
// We have to find where the user should begin to browse files
|
||||||
std::string start_folder_path;
|
std::string start_folder_path =
|
||||||
if (initialPath.empty()) {
|
base::get_file_path(
|
||||||
start_folder_path = get_initial_path_to_select_filename(initialPath);
|
get_initial_path_to_select_filename(initialPath));
|
||||||
}
|
|
||||||
else {
|
|
||||||
start_folder_path = base::get_file_path(initialPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
IFileItem* start_folder = fs->getFileItemFromPath(start_folder_path);
|
IFileItem* start_folder = fs->getFileItemFromPath(start_folder_path);
|
||||||
if (!start_folder) {
|
if (!start_folder) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user