From ac90cb5f173548b908f5b68e197355adfa164544 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 21 Sep 2018 18:18:50 +0200 Subject: [PATCH] - webtv-setup: init filebrowser only if needed Signed-off-by: Thilo Graf --- src/gui/webtv_setup.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/webtv_setup.cpp b/src/gui/webtv_setup.cpp index 6e04e2d11..104061f03 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webtv_setup.cpp @@ -88,12 +88,6 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey) } if (actionKey == "c" /* change */) { - CFileBrowser fileBrowser; - CFileFilter fileFilter; - fileFilter.addFilter("xml"); - fileFilter.addFilter("tv"); - fileFilter.addFilter("m3u"); - fileBrowser.Filter = &fileFilter; selected = m->getSelected(); CMenuItem *item = m->getItem(selected); CMenuForwarder *f = static_cast(item); @@ -114,6 +108,12 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey) } else { + CFileBrowser fileBrowser; + CFileFilter fileFilter; + fileFilter.addFilter("xml"); + fileFilter.addFilter("tv"); + fileFilter.addFilter("m3u"); + fileBrowser.Filter = &fileFilter; dirname = dirname.substr(0, dirname.rfind('/')); if (fileBrowser.exec(dirname.c_str()))