Add last location saving and loading per action type (#1587)

* Fixed code style

* Added last location saving and loading per action type

This saves and loads different paths per action type when presenting the
native file dialog popup.
This commit is contained in:
Iulian Onofrei
2018-10-27 23:24:01 +03:00
committed by Martin Kleusberg
parent aad06b8d7c
commit d526fa0b64
8 changed files with 96 additions and 42 deletions

View File

@@ -606,10 +606,11 @@ void PlotDock::on_treePlotColumns_itemDoubleClicked(QTreeWidgetItem* item, int c
void PlotDock::on_butSavePlot_clicked()
{
QString fileName = FileDialog::getSaveFileName(this,
tr("Choose a filename to save under"),
tr("PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*)")
);
QString fileName = FileDialog::getSaveFileName(
CreateDataFile,
this,
tr("Choose a filename to save under"),
tr("PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*)"));
if(!fileName.isEmpty())
{
if(fileName.endsWith(".png", Qt::CaseInsensitive))