mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 10:13:22 +00:00
Show relative path when exporting sprite (fix #4059)
When exporting a file that was already saved, shows the relative path to the original path instead of only the filename.
This commit is contained in:
parent
9fb0ee620c
commit
db639072f7
2
laf
2
laf
@ -1 +1 @@
|
||||
Subproject commit ca7739de757ad098e28e33a5e0645b6852c1e929
|
||||
Subproject commit 36abe0348ccdb00ddbb854ca21e1ae9ce75752f4
|
@ -192,8 +192,14 @@ void ExportFileWindow::setAniDir(const doc::AniDir aniDir)
|
||||
|
||||
void ExportFileWindow::setOutputFilename(const std::string& pathAndFilename)
|
||||
{
|
||||
m_outputPath = base::get_file_path(pathAndFilename);
|
||||
m_outputFilename = base::get_file_name(pathAndFilename);
|
||||
if (base::get_file_path(m_doc->filename()).empty()) {
|
||||
m_outputPath = base::get_file_path(pathAndFilename);
|
||||
m_outputFilename = base::get_file_name(pathAndFilename);
|
||||
}
|
||||
else {
|
||||
m_outputPath = base::get_file_path(m_doc->filename());
|
||||
m_outputFilename = base::get_relative_path(pathAndFilename, base::get_file_path(m_doc->filename()));
|
||||
}
|
||||
|
||||
updateOutputFilenameEntry();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user