From b5412a56b4630b887bfc6616f4767a53697575ed Mon Sep 17 00:00:00 2001 From: Gaucho316 Date: Fri, 14 Jun 2013 13:08:56 +0200 Subject: [PATCH] stringinput: Restore old value after input was cancelled in CExtendedInput Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad4f979b4be26c4c2e019b9c5dfb5a073721c8a1 Author: Gaucho316 Date: 2013-06-14 (Fri, 14 Jun 2013) Origin message was: ------------------ - stringinput: Restore old value after input was cancelled in CExtendedInput --- src/gui/widget/stringinput_ext.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 70e36bd26..9e57bd8ea 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -268,7 +268,10 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) } else if ( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { - loop = false; + strcpy(value, oldval); + loop=false; + if(cancel != NULL) + *cancel = true; res = menu_return::RETURN_EXIT_ALL; } }