From 02f89b753002952e161934ba7d0c5958c25a1a3c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Tue, 26 Apr 2011 01:54:03 +0200 Subject: [PATCH] Qt: don't save the filepath between session if recent is deactivated Close #4324 --- modules/gui/qt4/qt4.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 220d02d3e7..e5ecb32bc0 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -558,8 +558,11 @@ static void *Thread( void *obj ) /* Delete the recentsMRL object before the configuration */ RecentsMRL::killInstance(); - /* Save the path */ - getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath ); + /* Save the path or delete if recent play are disabled */ + if( var_InheritBool( p_intf, "qt-recentplay" ) ) + getSettings()->setValue( "filedialog-path", p_intf->p_sys->filepath ); + else + getSettings()->remove( "filedialog-path" ); /* Delete the configuration. Application has to be deleted after that. */ delete p_intf->p_sys->mainSettings; -- 2.39.2