diff options
author | B. Stack <bgstack15@gmail.com> | 2022-01-04 16:21:19 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-01-04 16:21:19 +0000 |
commit | 2c8ae2c99308b4f0bf2bb08161829efee43e31ca (patch) | |
tree | b8252ff8a09d9143ed2dc299d082f9d86535c1a2 /wx+/no_flicker.h | |
parent | Merge branch 'b11.15' into 'master' (diff) | |
parent | add upstream 11.16 (diff) | |
download | FreeFileSync-11.16.tar.gz FreeFileSync-11.16.tar.bz2 FreeFileSync-11.16.zip |
Merge branch 'b11.16' into 'master'11.16
add upstream 11.16
See merge request opensource-tracking/FreeFileSync!40
Diffstat (limited to 'wx+/no_flicker.h')
-rw-r--r-- | wx+/no_flicker.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wx+/no_flicker.h b/wx+/no_flicker.h index a84a7228..d8f2d6cd 100644 --- a/wx+/no_flicker.h +++ b/wx+/no_flicker.h @@ -30,15 +30,17 @@ void setText(wxTextCtrl& control, const wxString& newText, bool* additionalLayou } -void setText(wxStaticText& control, wxString newText, bool* additionalLayoutChange = nullptr) +void setText(wxStaticText& control, const wxString& newText, bool* additionalLayoutChange = nullptr) { + //wxControl::EscapeMnemonics() (& -> &&) => wxControl::GetLabelText/SetLabelText + //e.g. "filenames in the sync progress dialog": https://sourceforge.net/p/freefilesync/bugs/279/ - const wxString& label = control.GetLabel(); //perf: don't call twice! + const wxString& label = control.GetLabelText(); //perf: don't call twice! if (additionalLayoutChange && !*additionalLayoutChange) *additionalLayoutChange = label.length() != newText.length(); //avoid screen flicker: update layout only when necessary if (label != newText) - control.SetLabel(newText); + control.SetLabelText(newText); } |