Skip to content
Extraits de code Groupes Projets
Valider 1adae316 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

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.
parent 9969589c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -350,7 +350,10 @@ namespace Automation4 { ...@@ -350,7 +350,10 @@ namespace Automation4 {
bool TransferFromWindow() bool TransferFromWindow()
{ {
*value = static_cast<wxSpinCtrlDouble*>(GetWindow())->GetValue(); wxSpinCtrlDouble *ctrl = static_cast<wxSpinCtrlDouble*>(GetWindow());
wxFocusEvent evt;
ctrl->OnTextLostFocus(evt);
*value = ctrl->GetValue();
return true; return true;
} }
}; };
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter