widget/stringinput: fix compare

This commit is contained in:
Jacek Jendrzej
2016-12-24 14:58:07 +01:00
parent 3146f6c9f6
commit a0f0df7f17
2 changed files with 2 additions and 2 deletions

View File

@@ -494,7 +494,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
} }
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) ) else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
{ {
if ((*valueString != oldval) && if ((trim (*valueString) != oldval) &&
(ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) { (ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
continue; continue;

View File

@@ -267,7 +267,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & )
} }
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) ) else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
{ {
if(*valueString != oldval){ if (trim (*valueString) != oldval){
int erg = ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbNo | CMsgBox::mbYes | CMsgBox::mbCancel); int erg = ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbNo | CMsgBox::mbYes | CMsgBox::mbCancel);
if(erg==CMsgBox::mbrYes){ if(erg==CMsgBox::mbrYes){
*valueString = oldval; *valueString = oldval;