Commit e3b34f96 authored by Halla Rempt's avatar Halla Rempt
Browse files

Show the current working directory by default when starting without args

Instead of showing the directory from which we last loaded a file when
we start an app without any arguments, show the directory from which
the app was started.

parent 064d3839
......@@ -34,6 +34,7 @@
#include <kdesktopfile.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <krecentdirs.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <QtDBus/QtDBus>
......@@ -136,6 +137,13 @@ bool KoApplication::start()
// No argument -> create an empty document
if (!argsCount) {
// if there's no document, add the current working directory
// to the recent dirs so the open dialog and open pane show
// the directory from where the app was started, instead of
// the last directory from where we opened a file
KRecentDirs::add(":OpenDialog", QDir::currentPath());
QString errorMsg;
KoDocument* doc = entry.createDoc(&errorMsg);
if (!doc) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment