aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorMarcel Bonnet <marcelbonnet@anatel.gov.br>2018-07-18 23:58:04 -0300
committerMarcel Bonnet <marcelbonnet@anatel.gov.br>2018-07-18 23:58:04 -0300
commita9a6c9daeb450f4cee3eb7c077d2abad15d81415 (patch)
tree83c55a7beace35eaa06a62119304df4c47a4f0fc /src-qt5
parentupdate trident dark colors (diff)
downloadlumina-a9a6c9daeb450f4cee3eb7c077d2abad15d81415.tar.gz
lumina-a9a6c9daeb450f4cee3eb7c077d2abad15d81415.tar.bz2
lumina-a9a6c9daeb450f4cee3eb7c077d2abad15d81415.zip
Remembers last saved directory, after instance die
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 48a4ceb4..97042f9c 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -22,7 +22,6 @@ MainUI::MainUI()
IMG = new ImageEditor(this);
ui->scrollArea->setWidget(IMG);
areaOverlay = 0;
- ppath = QDir::homePath();
ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().width("200%") );
setupIcons();
ui->spin_monitor->setMaximum(QApplication::desktop()->screenCount());
@@ -60,6 +59,7 @@ MainUI::MainUI()
connect(tabbar, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)) );
connect(ui->check_show_popups, SIGNAL(toggled(bool)), this, SLOT(showPopupsChanged(bool)) );
settings = LUtils::openSettings("lumina-desktop", "lumina-screenshot",this);
+ ppath = settings->value("previous-path", QDir::homePath()).toString();
QString opt = settings->value("screenshot-target", "window").toString();
if( opt == "window") {ui->radio_window->setChecked(true); }
else if(opt=="area"){ ui->radio_area->setChecked(true); }
@@ -129,6 +129,7 @@ void MainUI::saveScreenshot(){
}else{
picSaved = true;
ppath = filepath.section("/",0,-2); //just the directory
+ settings->setValue("previous-path", ppath);
if (closeOnSave) {
// We came here from close, now we need to close *after* handling
// the current screen event.
bgstack15