mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 11:27:44 +00:00
BAGEL: Fix save dialog edit text increasing as selection changes
This commit is contained in:
parent
347a8021dd
commit
462f915754
@ -441,11 +441,8 @@ VOID CBagSaveDialog::OnBofButton(CBofObject *pObject, INT nFlags) {
|
||||
VOID CBagSaveDialog::OnBofListBox(CBofObject * /*pObject*/, INT nItemIndex) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
#if BOF_MAC
|
||||
// Hack to make sure that our edit text box remains the sole
|
||||
// getter of keydown events.
|
||||
m_bResetFocus = TRUE;
|
||||
#endif
|
||||
// Reset the focus away from the text field if set
|
||||
ReleaseFocus();
|
||||
|
||||
// There is only one list box on this dialog
|
||||
if (m_pListBox != nullptr) {
|
||||
@ -454,12 +451,10 @@ VOID CBagSaveDialog::OnBofListBox(CBofObject * /*pObject*/, INT nItemIndex) {
|
||||
|
||||
// Show selected item in the Edit control
|
||||
if (m_pEditText != nullptr) {
|
||||
m_pEditText->SetFocus();
|
||||
m_pEditText->SetText(m_pListBox->GetText(nItemIndex));
|
||||
#if BOF_MAC
|
||||
m_pEditText->OnSelect();
|
||||
m_pEditText->UpdateWindow();
|
||||
#endif
|
||||
}
|
||||
|
||||
m_nSelectedItem = nItemIndex;
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,7 @@ VOID CBofEditText::OnKeyHit(ULONG lKey, ULONG lRepCount) {
|
||||
CBofRect rect = CalculateTextRect(this, &tmp, 12, 0);
|
||||
|
||||
if ((m_cRect.Width() - rect.Width()) > 10) {
|
||||
_text = tmp;
|
||||
UpdateWindow();
|
||||
SetText(tmp);
|
||||
}
|
||||
|
||||
} else if (lKey == BKEY_BACK && !_text.IsEmpty()) {
|
||||
|
@ -212,8 +212,6 @@ VOID CBofListBox::OnLButtonDown(UINT /*nFlags*/, CBofPoint *pPoint, void *) {
|
||||
_parent->OnBofListBox(this, nIndex);
|
||||
}
|
||||
}
|
||||
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user