View Issue Details

IDProjectCategoryView StatusLast Update
0017555LazarusLCLpublic2011-07-11 17:10
ReporterPetr-KAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSOS Version
Product Version0.9.28.3 (SVN)Product BuildSVN 27585 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0017555: Random results from TCanvas.GetTextMetrics
DescriptionTCanvas.GetTextMetrics returns semirandom values. Sometimes correct values and sometimes values from "default" font.

This patch solves this problem:

--- lcl/include/canvas.inc (revision 27585)
+++ lcl/include/canvas.inc (working copy)
@@ -1016,7 +1016,7 @@
 var
   TTM: TTextMetric;
 begin
- RequiredState([csHandleValid]);
+ RequiredState([csHandleValid, csFontValid]);
   Fillchar(TM, SizeOf(TM), 0);
   Result := LCLIntf.GetTextMetrics(FHandle, TTM);
   if Result then begin
TagsNo tags attached.
Fixed in Revision27666
LazTarget-
WidgetsetGTK 2
Attached Files

Activities

Felipe Monteiro de Carvalho

2010-10-12 15:49

developer   ~0041748

Thanks, applied.

Petr-K

2011-07-11 17:10

reporter   ~0049886

Ok

Issue History

Date Modified Username Field Change
2010-10-06 17:10 Petr-K New Issue
2010-10-06 17:10 Petr-K Widgetset => GTK 2
2010-10-12 15:49 Felipe Monteiro de Carvalho Fixed in Revision => 27666
2010-10-12 15:49 Felipe Monteiro de Carvalho LazTarget => -
2010-10-12 15:49 Felipe Monteiro de Carvalho Status new => resolved
2010-10-12 15:49 Felipe Monteiro de Carvalho Fixed in Version => 0.9.29 (SVN)
2010-10-12 15:49 Felipe Monteiro de Carvalho Resolution open => fixed
2010-10-12 15:49 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2010-10-12 15:49 Felipe Monteiro de Carvalho Note Added: 0041748
2011-07-11 17:10 Petr-K Status resolved => closed
2011-07-11 17:10 Petr-K Note Added: 0049886