View Issue Details

IDProjectCategoryView StatusLast Update
0035466LazarusLCLpublic2019-04-30 18:03
ReporterSerge AnvarovAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindowsOS Version
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0035466: TWin32WSCustomPage.DestroyHandle micropatch
DescriptionDelete the unused variable. A side effect of the call is also not needed, because previously already checked using HandleAllocated
TagsNo tags attached.
Fixed in Revisionr61087
LazTarget-
Widgetset
Attached Files
  • TWin32WSCustomPage.DestroyHandle.diff (950 bytes)
    Index: lcl/interfaces/win32/win32pagecontrol.inc
    ===================================================================
    --- lcl/interfaces/win32/win32pagecontrol.inc	(revision 61078)
    +++ lcl/interfaces/win32/win32pagecontrol.inc	(working copy)
    @@ -130,7 +130,6 @@
     class procedure TWin32WSCustomPage.DestroyHandle(const AWinControl: TWinControl);
     var
       PageIndex, RealIndex: integer;
    -  PageControlHandle: HWND;
     begin
       // remove tab from pagecontrol only if not pfRemoving is set
       // if pfRemoving is set then Tab has been deleted by RemovePage
    @@ -137,7 +136,6 @@
       if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) and
          not (pfRemoving in TCustomPageAccess(AWinControl).Flags) then
       begin
    -    PageControlHandle := AWinControl.Parent.Handle;
         PageIndex := TCustomPage(AWinControl).PageIndex;
         RealIndex := TCustomTabControl(AWinControl.Parent).PageToTabIndex(PageIndex);
         if RealIndex <> -1 then
    

Activities

Serge Anvarov

2019-04-29 09:02

reporter  

TWin32WSCustomPage.DestroyHandle.diff (950 bytes)
Index: lcl/interfaces/win32/win32pagecontrol.inc
===================================================================
--- lcl/interfaces/win32/win32pagecontrol.inc	(revision 61078)
+++ lcl/interfaces/win32/win32pagecontrol.inc	(working copy)
@@ -130,7 +130,6 @@
 class procedure TWin32WSCustomPage.DestroyHandle(const AWinControl: TWinControl);
 var
   PageIndex, RealIndex: integer;
-  PageControlHandle: HWND;
 begin
   // remove tab from pagecontrol only if not pfRemoving is set
   // if pfRemoving is set then Tab has been deleted by RemovePage
@@ -137,7 +136,6 @@
   if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) and
      not (pfRemoving in TCustomPageAccess(AWinControl).Flags) then
   begin
-    PageControlHandle := AWinControl.Parent.Handle;
     PageIndex := TCustomPage(AWinControl).PageIndex;
     RealIndex := TCustomTabControl(AWinControl.Parent).PageToTabIndex(PageIndex);
     if RealIndex <> -1 then

Juha Manninen

2019-04-30 18:03

developer   ~0115926

Applied, thanks.

Issue History

Date Modified Username Field Change
2019-04-29 09:02 Serge Anvarov New Issue
2019-04-29 09:02 Serge Anvarov File Added: TWin32WSCustomPage.DestroyHandle.diff
2019-04-30 14:48 Juha Manninen Assigned To => Juha Manninen
2019-04-30 14:48 Juha Manninen Status new => assigned
2019-04-30 18:03 Juha Manninen Status assigned => resolved
2019-04-30 18:03 Juha Manninen Resolution open => fixed
2019-04-30 18:03 Juha Manninen Fixed in Revision => r61087
2019-04-30 18:03 Juha Manninen LazTarget => -
2019-04-30 18:03 Juha Manninen Note Added: 0115926