Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | None | T2494 META: Create usable end-user application / demo (3M3) | ||
Resolved | None | T1895 3M3 DataManager | ||
Resolved | None | T2746 File open dialog should remember last path |
Event Timeline
Fixed the bug, but the core commit didn't work at first go. I'll try it again on Thursday the 5th of November, but feel free to do it earlier with the attached patch.
Two little improvements:
- please have a look at QDir http://doc.trolltech.com/4.5/qdir.html for the path manipuilation, it's probably safer than std::string operations.
- if a static member is only used in one function, you can also move it inside the implementation of that function
Tried to implement the improvements.
- I didn't find a way to extract the path name out of a String which contains path and file (extract "C:\temp\" out of "C:\temp\test.stl" for example) with the class QDir. As far as I understand you already need a seperated path to construct a QDir object.
- The second improvement works fine, modified the sourcecode accordingly.
I'll add two attachments now: new version of the patch and a change request for core modifications to commit the patch.
Hi Alfred,
the solution is nice and simple, but please check
http://doc.trolltech.com/4.5/qfileinfo.html#pathx
for a more standard replacement of your method GetPath().
As for the change request, please copy it to
http://mitk.org/wiki/ChangeRequests/2746 (using the template suggested there)
and:
- instead of "add / modificate a few methods in the class QmitkFileOpenAction" you could write "remember used path in a static variable and reuse it for the next File/Open action" [because every change is "add/mod a bit.."
- there is a test-framework for gui tests (talk to Sascha), but a quick manual test would be sufficient
Implemented the suggested solution with qfileinfo. I'll add a patch with the new source code. Unfortuantely I've to leave in a few minutes and so there is no time left to write a new change request. I'll do this on monday.
[SVN revision 19969]
FIX (#2746): Added a static variable to class the QmitkFileOpenAction. In this variable the last directory from where a file was opened is stored to start in this directory again in the next file-open-process.
Created a change request which was accepted and then committed the changes. The
continous clients accepted the commit without errors, so in my opinion the bug
is solved