Commit 90052d1e authored by cutealien's avatar cutealien

Make sure after EGET_EDITBOX_ENTER and EGET_COMBO_BOX_CHANGED event processing...

Make sure after EGET_EDITBOX_ENTER and EGET_COMBO_BOX_CHANGED event processing no more code is executed for the corresponding editbox or combobox objects to allow clearing the environment on those actions (see comments on bug-id 2995838).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4239 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 37ed1c0b
...@@ -258,7 +258,10 @@ bool CGUIComboBox::OnEvent(const SEvent& event) ...@@ -258,7 +258,10 @@ bool CGUIComboBox::OnEvent(const SEvent& event)
setSelected((s32)Items.size() -1); setSelected((s32)Items.size() -1);
if (Selected != oldSelected) if (Selected != oldSelected)
{
sendSelectionChangedEvent(); sendSelectionChangedEvent();
return true;
}
if (absorb) if (absorb)
return true; return true;
...@@ -341,7 +344,10 @@ bool CGUIComboBox::OnEvent(const SEvent& event) ...@@ -341,7 +344,10 @@ bool CGUIComboBox::OnEvent(const SEvent& event)
setSelected((s32)Items.size() -1); setSelected((s32)Items.size() -1);
if (Selected != oldSelected) if (Selected != oldSelected)
{
sendSelectionChangedEvent(); sendSelectionChangedEvent();
return true;
}
} }
default: default:
break; break;
......
...@@ -462,13 +462,13 @@ bool CGUIEditBox::processKey(const SEvent& event) ...@@ -462,13 +462,13 @@ bool CGUIEditBox::processKey(const SEvent& event)
if (MultiLine) if (MultiLine)
{ {
inputChar(L'\n'); inputChar(L'\n');
return true;
} }
else else
{ {
calculateScrollPos();
sendGuiEvent( EGET_EDITBOX_ENTER ); sendGuiEvent( EGET_EDITBOX_ENTER );
} }
break; return true;
case KEY_LEFT: case KEY_LEFT:
if (event.KeyInput.Shift) if (event.KeyInput.Shift)
...@@ -694,10 +694,13 @@ bool CGUIEditBox::processKey(const SEvent& event) ...@@ -694,10 +694,13 @@ bool CGUIEditBox::processKey(const SEvent& event)
if (textChanged) if (textChanged)
{ {
breakText(); breakText();
calculateScrollPos();
sendGuiEvent(EGET_EDITBOX_CHANGED); sendGuiEvent(EGET_EDITBOX_CHANGED);
} }
else
{
calculateScrollPos(); calculateScrollPos();
}
return true; return true;
} }
...@@ -1323,8 +1326,8 @@ void CGUIEditBox::inputChar(wchar_t c) ...@@ -1323,8 +1326,8 @@ void CGUIEditBox::inputChar(wchar_t c)
} }
} }
breakText(); breakText();
sendGuiEvent(EGET_EDITBOX_CHANGED);
calculateScrollPos(); calculateScrollPos();
sendGuiEvent(EGET_EDITBOX_CHANGED);
} }
// calculate autoscroll // calculate autoscroll
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment