mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fix of #3797: OSX specific bug:
Added missed invalidation for a bKilledFocus flag. Without this invalidation TextCtrl updates their value only each odd try.
This commit is contained in:
parent
ed760ae932
commit
481719ed15
1 changed files with 7 additions and 4 deletions
|
@ -375,12 +375,11 @@ void TextCtrl::BUILD() {
|
||||||
{
|
{
|
||||||
e.Skip();
|
e.Skip();
|
||||||
#ifdef __WXOSX__
|
#ifdef __WXOSX__
|
||||||
// OSX issue: For some unknown reason wxEVT_KILL_FOCUS is emitted twice in a row
|
// OSX issue: For some unknown reason wxEVT_KILL_FOCUS is emitted twice in a row in some cases
|
||||||
|
// (like when information dialog is shown during an update of the option value)
|
||||||
// Thus, suppress its second call
|
// Thus, suppress its second call
|
||||||
if (bKilledFocus) {
|
if (bKilledFocus)
|
||||||
bKilledFocus = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
bKilledFocus = true;
|
bKilledFocus = true;
|
||||||
#endif // __WXOSX__
|
#endif // __WXOSX__
|
||||||
|
|
||||||
|
@ -391,6 +390,10 @@ void TextCtrl::BUILD() {
|
||||||
bEnterPressed = false;
|
bEnterPressed = false;
|
||||||
else
|
else
|
||||||
propagate_value();
|
propagate_value();
|
||||||
|
#ifdef __WXOSX__
|
||||||
|
// After processing of KILL_FOCUS event we should to invalidate a bKilledFocus flag
|
||||||
|
bKilledFocus = false;
|
||||||
|
#endif // __WXOSX__
|
||||||
}), temp->GetId());
|
}), temp->GetId());
|
||||||
|
|
||||||
// select all text using Ctrl+A
|
// select all text using Ctrl+A
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue