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