Fix controller tooltip temporarily disappearing when dealing with stacks of items

This commit is contained in:
Andrew Lanzone 2025-07-06 22:40:12 -07:00
parent e349fa248a
commit fdc392435f

View File

@ -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);