summaryrefslogtreecommitdiff
path: root/wx+/no_flicker.h
diff options
context:
space:
mode:
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