mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
On Save-as, open FileDialog in same directory of previous filename
This commit is contained in:
@@ -160,6 +160,11 @@ void DialogToolkit::SaveSessionDialog::open()
|
||||
}
|
||||
}
|
||||
|
||||
void DialogToolkit::SaveSessionDialog::setFolder(std::string path)
|
||||
{
|
||||
Settings::application.dialogRecentFolder[id_] = SystemToolkit::path_filename( path );
|
||||
}
|
||||
|
||||
std::string openFolderDialog(const std::string &label, const std::string &path);
|
||||
void DialogToolkit::OpenFolderDialog::open()
|
||||
{
|
||||
|
||||
@@ -62,6 +62,7 @@ class SaveSessionDialog : public FileDialog
|
||||
{
|
||||
public:
|
||||
SaveSessionDialog(const std::string &name) : FileDialog(name) {}
|
||||
void setFolder(std::string path);
|
||||
void open();
|
||||
};
|
||||
|
||||
|
||||
@@ -700,8 +700,12 @@ bool UserInterface::TryClose()
|
||||
|
||||
void UserInterface::selectSaveFilename()
|
||||
{
|
||||
if (sessionsavedialog)
|
||||
if (sessionsavedialog) {
|
||||
if (!Mixer::manager().session()->filename().empty())
|
||||
sessionsavedialog->setFolder( Mixer::manager().session()->filename() );
|
||||
|
||||
sessionsavedialog->open();
|
||||
}
|
||||
|
||||
navigator.hidePannel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user