View Issue Details

IDProjectCategoryView StatusLast Update
0034028LazarusIDEpublic2019-02-26 02:15
ReporterCyrax Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
PlatformLinux x86_64OSArch 
Product Version1.9 (SVN) 
Target Version1.8.6Fixed in Version1.8.6 
Summary0034028: [patch] Fix for debug attach dialog so correct PID is got when selecting a process from the list.
DescriptionAttached patch makes debug attach dialog work correctly when selecting a process from the list.
TagsNo tags attached.
Fixed in Revision58638
LazTarget1.8.6
Widgetset
Attached Files

Activities

Cyrax

2018-07-25 01:55

reporter  

debugattachdialog.diff (4,003 bytes)   
diff --git debugger/debugattachdialog.lfm debugger/debugattachdialog.lfm
index dce72c561d..3d61a82a49 100644
--- debugger/debugattachdialog.lfm
+++ debugger/debugattachdialog.lfm
@@ -11,13 +11,13 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
   Constraints.MinWidth = 400
   OnCreate = FormCreate
   Position = poScreenCenter
-  LCLVersion = '1.3'
+  LCLVersion = '1.9.0.0'
   object labelRunningProcesses: TLabel
     AnchorSideTop.Control = Owner
     Left = 8
-    Height = 13
+    Height = 17
     Top = 6
-    Width = 90
+    Width = 123
     BorderSpacing.Left = 6
     BorderSpacing.Top = 6
     Caption = 'Running Processes'
@@ -31,8 +31,8 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = btnRefresh
     Left = 6
-    Height = 475
-    Top = 25
+    Height = 467
+    Top = 29
     Width = 388
     Anchors = [akTop, akLeft, akRight, akBottom]
     BorderSpacing.Around = 6
@@ -43,27 +43,27 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
       end    
       item
         Caption = 'PID'
-        Width = 150
+        Width = 165
       end>
     OwnerData = True
     ReadOnly = True
     RowSelect = True
     TabOrder = 0
     ViewStyle = vsReport
-    OnChange = lvProcessesChange
     OnColumnClick = lvProcessesColumnClick
     OnData = lvProcessesData
     OnDblClick = lvProcessesDblClick
     OnKeyDown = lvProcessesKeyDown
+    OnSelectItem = lvProcessesSelectItem
   end
   object btnRefresh: TButton
     AnchorSideLeft.Control = Owner
     AnchorSideBottom.Control = Owner
     AnchorSideBottom.Side = asrBottom
     Left = 6
-    Height = 23
-    Top = 506
-    Width = 64
+    Height = 27
+    Top = 502
+    Width = 61
     Anchors = [akLeft, akBottom]
     AutoSize = True
     BorderSpacing.Left = 6
@@ -77,10 +77,10 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
     AnchorSideLeft.Side = asrBottom
     AnchorSideBottom.Control = btnRefresh
     AnchorSideBottom.Side = asrBottom
-    Left = 76
-    Height = 23
-    Top = 506
-    Width = 58
+    Left = 73
+    Height = 27
+    Top = 502
+    Width = 52
     Anchors = [akLeft, akBottom]
     AutoSize = True
     BorderSpacing.Left = 6
@@ -94,10 +94,10 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
     AnchorSideRight.Side = asrBottom
     AnchorSideBottom.Control = btnRefresh
     AnchorSideBottom.Side = asrBottom
-    Left = 336
-    Height = 23
-    Top = 506
-    Width = 58
+    Left = 340
+    Height = 27
+    Top = 502
+    Width = 54
     Anchors = [akRight, akBottom]
     AutoSize = True
     BorderSpacing.Right = 6
diff --git debugger/debugattachdialog.pas debugger/debugattachdialog.pas
index 3b94f239b9..402dafd782 100644
--- debugger/debugattachdialog.pas
+++ debugger/debugattachdialog.pas
@@ -30,13 +30,12 @@ type
     lvProcesses: TListView;
     procedure btnRefreshClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
-    procedure lvProcessesChange(Sender: TObject; Item: TListItem;
-      {%H-}Change: TItemChange);
     procedure lvProcessesColumnClick(Sender: TObject; Column: TListColumn);
     procedure lvProcessesData(Sender: TObject; Item: TListItem);
     procedure lvProcessesDblClick(Sender: TObject);
     procedure lvProcessesKeyDown(Sender: TObject; var Key: Word;
       {%H-}Shift: TShiftState);
+    procedure lvProcessesSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
   private
     FPidString: string;
     FList: TRunningProcessInfoList;
@@ -282,12 +281,11 @@ begin
   end;
 end;
 
-procedure TDebugAttachDialogForm.lvProcessesChange(Sender: TObject;
-  Item: TListItem; Change: TItemChange);
+procedure TDebugAttachDialogForm.lvProcessesSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
 var
   info: TRunningProcessInfo;
 begin
-  if Item.Index <> -1 then
+  if (Item.Index <> -1) And Selected then
   begin
     info := TRunningProcessInfo(FList.Items[Item.Index]);
     FPidString := IntToStr(info.PID);
debugattachdialog.diff (4,003 bytes)   

Martin Friebe

2018-07-26 13:54

manager   ~0109686

Thanks, applied in r58638

Please test and close if ok

Cyrax

2019-02-26 02:15

reporter   ~0114449

Thanks for applying the patch!

Issue History

Date Modified Username Field Change
2018-07-25 01:55 Cyrax New Issue
2018-07-25 01:55 Cyrax File Added: debugattachdialog.diff
2018-07-25 02:23 Martin Friebe Assigned To => Martin Friebe
2018-07-25 02:23 Martin Friebe Status new => assigned
2018-07-26 13:54 Martin Friebe Fixed in Revision => 58638
2018-07-26 13:54 Martin Friebe LazTarget => 1.8.6
2018-07-26 13:54 Martin Friebe Note Added: 0109686
2018-07-26 13:54 Martin Friebe Status assigned => resolved
2018-07-26 13:54 Martin Friebe Fixed in Version => 1.8.6
2018-07-26 13:54 Martin Friebe Resolution open => fixed
2018-07-26 13:54 Martin Friebe Target Version => 1.8.6
2019-02-26 02:15 Cyrax Note Added: 0114449
2019-02-26 02:15 Cyrax Status resolved => closed