IDE: procedurelist: check if item really selected in OnSelectItem() event, otherwise unselected item is shown in status bar.

git-svn-id: trunk@27678 -
This commit is contained in:
zeljko 2010-10-13 09:52:31 +00:00
parent 8ff93b3a7e
commit a51553ba61
2 changed files with 36 additions and 36 deletions

View File

@ -12,11 +12,11 @@ object ProcedureListForm: TProcedureListForm
OnResize = FormResize OnResize = FormResize
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
object StatusBar: TStatusBar object StatusBar: TStatusBar
Left = 0 Left = 0
Height = 23 Height = 20
Top = 665 Top = 668
Width = 952 Width = 952
Panels = < Panels = <
item item
@ -35,41 +35,41 @@ object ProcedureListForm: TProcedureListForm
Caption = 'TB' Caption = 'TB'
TabOrder = 1 TabOrder = 1
object tbAbout: TToolButton object tbAbout: TToolButton
Left = 136 Left = 132
Hint = 'About' Hint = 'About'
Top = 2 Top = 2
Caption = 'tbAbout' Caption = 'tbAbout'
ImageIndex = 9 ImageIndex = 9
OnClick = tbAboutClick
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
OnClick = tbAboutClick
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 131 Left = 128
Top = 2 Top = 2
Width = 5 Width = 4
Caption = 'ToolButton2' Caption = 'ToolButton2'
Style = tbsDivider Style = tbsDivider
end end
object tbJumpTo: TToolButton object tbJumpTo: TToolButton
Left = 108 Left = 105
Hint = 'Jump To Selection' Hint = 'Jump To Selection'
Top = 2 Top = 2
Caption = 'Goto' Caption = 'Goto'
ImageIndex = 5 ImageIndex = 5
OnClick = LVDblClick
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
OnClick = LVDblClick
end end
object ToolButton4: TToolButton object ToolButton4: TToolButton
Left = 103 Left = 101
Top = 2 Top = 2
Width = 5 Width = 4
Caption = 'ToolButton4' Caption = 'ToolButton4'
Style = tbsDivider Style = tbsDivider
end end
object tbFilterAny: TToolButton object tbFilterAny: TToolButton
Left = 80 Left = 78
Hint = 'Filter by matching any part of method' Hint = 'Filter by matching any part of method'
Top = 2 Top = 2
Caption = 'tbFilterAny' Caption = 'tbFilterAny'
@ -81,7 +81,7 @@ object ProcedureListForm: TProcedureListForm
Style = tbsCheck Style = tbsCheck
end end
object tbFilterStart: TToolButton object tbFilterStart: TToolButton
Left = 57 Left = 55
Hint = 'Filter by matching with start of method' Hint = 'Filter by matching with start of method'
Top = 2 Top = 2
Caption = 'tbFilterStart' Caption = 'tbFilterStart'
@ -92,14 +92,14 @@ object ProcedureListForm: TProcedureListForm
Style = tbsCheck Style = tbsCheck
end end
object ToolButton7: TToolButton object ToolButton7: TToolButton
Left = 52 Left = 51
Top = 2 Top = 2
Width = 5 Width = 4
Caption = 'ToolButton7' Caption = 'ToolButton7'
Style = tbsDivider Style = tbsDivider
end end
object tbChangeFont: TToolButton object tbChangeFont: TToolButton
Left = 29 Left = 28
Hint = 'Change Font' Hint = 'Change Font'
Top = 2 Top = 2
Caption = 'tbChangeFont' Caption = 'tbChangeFont'
@ -110,7 +110,7 @@ object ProcedureListForm: TProcedureListForm
object ToolButton9: TToolButton object ToolButton9: TToolButton
Left = 24 Left = 24
Top = 2 Top = 2
Width = 5 Width = 4
Caption = 'ToolButton9' Caption = 'ToolButton9'
Style = tbsDivider Style = tbsDivider
end end
@ -120,20 +120,20 @@ object ProcedureListForm: TProcedureListForm
Top = 2 Top = 2
Caption = 'tbCopy' Caption = 'tbCopy'
ImageIndex = 6 ImageIndex = 6
OnClick = tbCopyClick
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
OnClick = tbCopyClick
end end
end end
object pnlHeader: TPanel object pnlHeader: TPanel
Left = 0 Left = 0
Height = 35 Height = 33
Top = 26 Top = 26
Width = 952 Width = 952
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 35 ClientHeight = 33
ClientWidth = 952 ClientWidth = 952
ParentColor = False ParentColor = False
TabOrder = 2 TabOrder = 2
@ -141,9 +141,9 @@ object ProcedureListForm: TProcedureListForm
AnchorSideTop.Control = pnlHeader AnchorSideTop.Control = pnlHeader
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 14 Height = 16
Top = 10 Top = 8
Width = 34 Width = 43
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = '&Search' Caption = '&Search'
ParentColor = False ParentColor = False
@ -154,9 +154,9 @@ object ProcedureListForm: TProcedureListForm
AnchorSideTop.Control = pnlHeader AnchorSideTop.Control = pnlHeader
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 581 Left = 581
Height = 14 Height = 16
Top = 10 Top = 8
Width = 38 Width = 46
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = '&Objects' Caption = '&Objects'
@ -169,10 +169,10 @@ object ProcedureListForm: TProcedureListForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cbObjects AnchorSideBottom.Control = cbObjects
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 46 Left = 55
Height = 21 Height = 21
Top = 6 Top = 6
Width = 517 Width = 508
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -188,15 +188,13 @@ object ProcedureListForm: TProcedureListForm
AnchorSideTop.Control = pnlHeader AnchorSideTop.Control = pnlHeader
AnchorSideRight.Control = pnlHeader AnchorSideRight.Control = pnlHeader
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 625 Left = 633
Height = 21 Height = 21
Top = 6 Top = 6
Width = 321 Width = 313
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoComplete = False
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 13 ItemHeight = 0
ItemWidth = 0
OnChange = cbObjectsChange OnChange = cbObjectsChange
Sorted = True Sorted = True
Style = csDropDownList Style = csDropDownList
@ -205,8 +203,8 @@ object ProcedureListForm: TProcedureListForm
end end
object LV: TListView object LV: TListView
Left = 0 Left = 0
Height = 604 Height = 609
Top = 61 Top = 59
Width = 952 Width = 952
Align = alClient Align = alClient
Columns = < Columns = <
@ -224,6 +222,7 @@ object ProcedureListForm: TProcedureListForm
Width = 238 Width = 238
end> end>
HideSelection = False HideSelection = False
ItemIndex = -1
Items.LazData = { Items.LazData = {
4C0000000100000000000000FFFFFFFFFFFFFFFF03000000000000000E000000 4C0000000100000000000000FFFFFFFFFFFFFFFF03000000000000000E000000
54466F726D2E54657374466F75720800000046756E6374696F6E020000003234 54466F726D2E54657374466F75720800000046756E6374696F6E020000003234

View File

@ -231,7 +231,8 @@ begin
Exit; //==> Exit; //==>
if Item.SubItems.Count < 4 then if Item.SubItems.Count < 4 then
Exit; //==> Exit; //==>
StatusBar.Panels[0].Text := Item.SubItems[4]; if Selected then
StatusBar.Panels[0].Text := Item.SubItems[4];
end; end;