-rw-r--r-- | core/apps/textedit/textedit.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ce868d6..2f62789 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -573,2 +573,5 @@ void TextEdit::fileNew() { | |||
573 | void TextEdit::fileOpen() { | 573 | void TextEdit::fileOpen() { |
574 | Config cfg("TextEdit"); | ||
575 | cfg. setGroup ( "View" ); | ||
576 | QString dir = cfg.readEntry("LastOpenDirectory", QPEApplication::documentDir()); | ||
574 | QMap<QString, QStringList> map; | 577 | QMap<QString, QStringList> map; |
@@ -581,6 +584,9 @@ void TextEdit::fileOpen() { | |||
581 | QString str = OFileDialog::getOpenFileName( 2, | 584 | QString str = OFileDialog::getOpenFileName( 2, |
582 | QPEApplication::documentDir(), | 585 | dir , |
583 | QString::null, map); | 586 | QString::null, map); |
584 | if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) | 587 | if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) |
588 | { | ||
589 | cfg.writeEntry("LastOpenDirectory", QFileInfo(str).dirPath(false)); | ||
585 | openFile( str ); | 590 | openFile( str ); |
591 | } | ||
586 | else | 592 | else |