diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 591dcaba9..e64dfb39b 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -243,7 +243,7 @@ bool CFlashUpdate::selectHttpImage(void) else ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_NEW_NOTFOUND), CMessageBox::mbrOk, CMessageBox::mbOk, NEUTRINO_ICON_INFO); - SelectionWidget.exec(NULL, ""); + menu_ret = SelectionWidget.exec(NULL, ""); for (std::vector::iterator it = update_t_list.begin(); it != update_t_list.end(); ++it) delete (*it); @@ -343,8 +343,10 @@ printf("[update] mode is %d\n", g_settings.softupdate_mode); UpdatesBrowser.Filter = &UpdatesFilter; CFile * CFileSelected = NULL; - if (!(UpdatesBrowser.exec(g_settings.update_dir))) + if (!(UpdatesBrowser.exec(g_settings.update_dir))) { + menu_ret = UpdatesBrowser.getMenuRet(); return false; + } CFileSelected = UpdatesBrowser.getSelectedFile(); @@ -386,6 +388,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) if(parent) parent->hide(); + menu_ret = menu_return::RETURN_REPAINT; paint(); if(sysfs.size() < 8) { @@ -395,7 +398,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) } if(!checkVersion4Update()) { hide(); - return menu_return::RETURN_REPAINT; + return menu_ret; //menu_return::RETURN_REPAINT; } #ifdef VFD_UPDATE diff --git a/src/gui/update.h b/src/gui/update.h index 98122db86..487ff3eb8 100644 --- a/src/gui/update.h +++ b/src/gui/update.h @@ -53,6 +53,7 @@ class CFlashUpdate : public CProgressWindow std::string installedVersion; std::string newVersion; + int menu_ret; bool selectHttpImage(void); bool getUpdateImage(const std::string & version);