mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-28 06:30:36 -04:00
Fix controller tooltip temporarily disappearing when dealing with stacks of items
This commit is contained in:
parent
e349fa248a
commit
fdc392435f
@ -71,17 +71,16 @@ namespace MWGui
|
|||||||
|
|
||||||
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
eventOkClicked(nullptr, mSlider->getScrollPosition() + 1);
|
// The order here matters. Hide the dialog first so the OK event tooltips reappear.
|
||||||
|
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
|
eventOkClicked(nullptr, mSlider->getScrollPosition() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// essentially duplicating what the OK button does if user presses
|
// essentially duplicating what the OK button does if user presses
|
||||||
// Enter key
|
// Enter key
|
||||||
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
||||||
{
|
{
|
||||||
eventOkClicked(nullptr, mSlider->getScrollPosition() + 1);
|
onOkButtonClicked(_sender);
|
||||||
setVisible(false);
|
|
||||||
|
|
||||||
// To do not spam onEnterKeyPressed() again and again
|
// To do not spam onEnterKeyPressed() again and again
|
||||||
MWBase::Environment::get().getWindowManager()->injectKeyRelease(MyGUI::KeyCode::None);
|
MWBase::Environment::get().getWindowManager()->injectKeyRelease(MyGUI::KeyCode::None);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user