[Kst] branches/work/kst/portto4/kst/src
Nicolas Brisset
nicolas.brisset at eurocopter.com
Thu May 5 23:08:41 CEST 2011
SVN commit 1230526 by brisset:
Remember the last used replacement file in the Change Data File dialog. It was one of the little things I had listed in the 2.0.3 QA comments.
BTW, nice trick, this dialogdefaults.h thing :-)
M +7 -1 libkstapp/changefiledialog.cpp
M +1 -0 widgets/dialogdefaults.h
--- branches/work/kst/portto4/kst/src/libkstapp/changefiledialog.cpp #1230525:1230526
@@ -11,6 +11,7 @@
***************************************************************************/
#include "changefiledialog.h"
+#include "dialogdefaults.h"
#include "datacollection.h"
#include "datasourcedialog.h"
@@ -71,7 +72,8 @@
connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
- _dataFile->setFile(QDir::currentPath());
+ _dataFile->setFile(_dialogDefaults->value("changedatafile/newFileName",QDir::currentPath()).toString());
+
updateButtons();
}
@@ -476,6 +478,10 @@
UpdateManager::self()->doUpdates(true);
kstApp->mainWindow()->document()->setChanged(true);
+
+ // store the newly used file as default for the next time the dialog is called
+ _dialogDefaults->setValue("changedatafile/newFileName",_dataFile->file());
+
}
}
--- branches/work/kst/portto4/kst/src/widgets/dialogdefaults.h #1230525:1230526
@@ -92,3 +92,4 @@
// wizard/curvePlacement enum datawizard.cpp
// wizard/plotCount int datawizard.cpp
+// changedatafile/newFileName QString changefiledialog.cpp
More information about the Kst
mailing list