summaryrefslogtreecommitdiff
path: root/wx+/no_flicker.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-01-04 10:50:14 -0500
committerB. Stack <bgstack15@gmail.com>2022-01-04 10:50:14 -0500
commit75bc2e56125125511a0505718dcb2c3d4150a933 (patch)
treeb8252ff8a09d9143ed2dc299d082f9d86535c1a2 /wx+/no_flicker.h
parentMerge branch 'b11.15' into 'master' (diff)
downloadFreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.tar.gz
FreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.tar.bz2
FreeFileSync-75bc2e56125125511a0505718dcb2c3d4150a933.zip
add upstream 11.16
Diffstat (limited to 'wx+/no_flicker.h')
-rw-r--r--wx+/no_flicker.h8
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);
}
bgstack15