More OS/2 updates reflecting changes in 24 Branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,6 +121,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
||||
int nHeightLineDefault = 0;
|
||||
int nHeightLine = 0;
|
||||
wxString sCurLine;
|
||||
bool bLastWasAmpersand = FALSE;
|
||||
|
||||
for (const wxChar *pc = sText; ; pc++)
|
||||
{
|
||||
@@ -161,6 +162,29 @@ wxSize wxStaticText::DoGetBestSize() const
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// We shouldn't take into account the '&' which just introduces the
|
||||
// mnemonic characters and so are not shown on the screen -- except
|
||||
// when it is preceded by another '&' in which case it stands for a
|
||||
// literal ampersand
|
||||
//
|
||||
if (*pc == _T('&'))
|
||||
{
|
||||
if (!bLastWasAmpersand)
|
||||
{
|
||||
bLastWasAmpersand = TRUE;
|
||||
|
||||
//
|
||||
// Skip the statement adding pc to curLine below
|
||||
//
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// It is a literal ampersand
|
||||
//
|
||||
bLastWasAmpersand = FALSE;
|
||||
}
|
||||
sCurLine += *pc;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user