mirror of https://github.com/odrling/Aegisub
Send a fake focus lost event to wxSpinCtrlDouble before reading the value
wxSpinCtrlDouble only updates its value when the spin button is clicked or it loses focus, and in some cases we want to read the value while it still has focus. Closes #1610.
This commit is contained in:
parent
9969589cd6
commit
1adae3160c
|
@ -350,7 +350,10 @@ namespace Automation4 {
|
|||
|
||||
bool TransferFromWindow()
|
||||
{
|
||||
*value = static_cast<wxSpinCtrlDouble*>(GetWindow())->GetValue();
|
||||
wxSpinCtrlDouble *ctrl = static_cast<wxSpinCtrlDouble*>(GetWindow());
|
||||
wxFocusEvent evt;
|
||||
ctrl->OnTextLostFocus(evt);
|
||||
*value = ctrl->GetValue();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue