mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 09:59:10 +02:00
lcl: TCustomForm.UpdateDockCaption: fixed repair garbage
git-svn-id: trunk@37461 -
This commit is contained in:
parent
42312bafc2
commit
3bfe2eecf6
@ -38,11 +38,10 @@ interface
|
|||||||
{$DEFINE HasDefaultValues}
|
{$DEFINE HasDefaultValues}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Types, TypInfo, Math,
|
Classes, SysUtils, Types, TypInfo, Math, AvgLvlTree, Maps, LCLVersion,
|
||||||
AvgLvlTree, Maps, LCLVersion, LCLStrConsts, LCLType, LCLProc, LCLIntf,
|
LCLStrConsts, LCLType, LCLProc, LCLIntf, FileUtil, LazUTF8, InterfaceBase,
|
||||||
FileUtil, InterfaceBase, LResources, GraphType, Graphics, Menus, LMessages,
|
LResources, GraphType, Graphics, Menus, LMessages, CustomTimer, ActnList,
|
||||||
CustomTimer, ActnList, ClipBrd, CustApp, HelpIntfs, LCLClasses, Controls,
|
ClipBrd, CustApp, HelpIntfs, LCLClasses, Controls, ImgList, Themes
|
||||||
ImgList, Themes
|
|
||||||
{$ifndef wince},gettext{$endif}// remove ifdefs when gettext is fixed and a new fpc is released
|
{$ifndef wince},gettext{$endif}// remove ifdefs when gettext is fixed and a new fpc is released
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -3009,13 +3009,7 @@ begin
|
|||||||
CtrlCaption:=GetDockCaption(AControl);
|
CtrlCaption:=GetDockCaption(AControl);
|
||||||
if CtrlCaption='' then continue;
|
if CtrlCaption='' then continue;
|
||||||
// do not put garbage in the title
|
// do not put garbage in the title
|
||||||
p:=FindInvalidUTF8Character(PChar(CtrlCaption),length(CtrlCaption),true);
|
UTF8FixBroken(CtrlCaption);
|
||||||
if p>=0 then
|
|
||||||
begin
|
|
||||||
CtrlCaption:=copy(CtrlCaption,1,p+1);
|
|
||||||
if CtrlCaption='' then
|
|
||||||
CtrlCaption:='?';
|
|
||||||
end;
|
|
||||||
if not (AControl is TCustomForm) then
|
if not (AControl is TCustomForm) then
|
||||||
begin
|
begin
|
||||||
// non controls like tmemo can have very long captions => cut them
|
// non controls like tmemo can have very long captions => cut them
|
||||||
|
Loading…
Reference in New Issue
Block a user