mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 12:40:50 +00:00
Default folder for new files must be the latest used folder (fix #1068)
To behave in this way, the open/save dialog must receive a document filename with an empty path.
This commit is contained in:
parent
9cc8d43f0a
commit
4be68ab5f0
@ -64,7 +64,12 @@ std::string Document::name() const
|
|||||||
|
|
||||||
void Document::setFilename(const std::string& filename)
|
void Document::setFilename(const std::string& filename)
|
||||||
{
|
{
|
||||||
m_filename = base::normalize_path(filename);
|
// Normalize the path (if the filename has a path)
|
||||||
|
if (!base::get_file_path(filename).empty())
|
||||||
|
m_filename = base::normalize_path(filename);
|
||||||
|
else
|
||||||
|
m_filename = filename;
|
||||||
|
|
||||||
notifyObservers(&DocumentObserver::onFileNameChanged, this);
|
notifyObservers(&DocumentObserver::onFileNameChanged, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user