set directory of file dialog when opening file by double-click, recent files list or drag and drop
This commit is contained in:
@@ -1026,7 +1026,11 @@ void MainWindow::processMessages(const QList<QByteArray> & msg)
|
||||
if (it->startsWith(action))
|
||||
files.push_back(std::string(it->mid(action.size()).constData()));
|
||||
}
|
||||
App::Application::processFiles(files);
|
||||
files = App::Application::processFiles(files);
|
||||
for (std::list<std::string>::iterator it = files.begin(); it != files.end(); ++it) {
|
||||
QString filename = QString::fromUtf8(it->c_str(), it->size());
|
||||
FileDialog::setWorkingDirectory(filename);
|
||||
}
|
||||
}
|
||||
catch (const Base::SystemExitException&) {
|
||||
}
|
||||
@@ -1036,7 +1040,12 @@ void MainWindow::delayedStartup()
|
||||
{
|
||||
// processing all command line files
|
||||
try {
|
||||
App::Application::processCmdLineFiles();
|
||||
std::list<std::string> files = App::Application::getCmdLineFiles();
|
||||
files = App::Application::processFiles(files);
|
||||
for (std::list<std::string>::iterator it = files.begin(); it != files.end(); ++it) {
|
||||
QString filename = QString::fromUtf8(it->c_str(), it->size());
|
||||
FileDialog::setWorkingDirectory(filename);
|
||||
}
|
||||
}
|
||||
catch (const Base::SystemExitException&) {
|
||||
throw;
|
||||
|
||||
Reference in New Issue
Block a user