IDE: don't show error message in new dialog when double clicking a non-leave node (bug #9467)

git-svn-id: trunk@11840 -
This commit is contained in:
vincents 2007-08-21 08:21:15 +00:00
parent 00d98505e3
commit 898efab50a
3 changed files with 65 additions and 63 deletions

View File

@ -1,36 +1,29 @@
object NewOtherDialog: TNewOtherDialog object NewOtherDialog: TNewOtherDialog
Left = 481
Height = 296
Top = 362
Width = 397
HorzScrollBar.Page = 396
VertScrollBar.Page = 295
ActiveControl = ItemsTreeView ActiveControl = ItemsTreeView
BorderStyle = bsSizeToolWin BorderStyle = bsSizeToolWin
Caption = 'NewOtherDialog' Caption = 'NewOtherDialog'
ClientHeight = 296 ClientHeight = 296
ClientWidth = 397 ClientWidth = 397
PixelsPerInch = 112
Position = poScreenCenter Position = poScreenCenter
HorzScrollBar.Page = 396
VertScrollBar.Page = 295
Left = 481
Height = 296
Top = 362
Width = 397
object ItemsTreeView: TTreeView object ItemsTreeView: TTreeView
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6
DefaultItemHeight = 14
TabOrder = 0
OnDblClick = OkButtonClick
OnSelectionChanged = ItemsTreeViewSelectionChanged
Left = 6 Left = 6
Height = 246 Height = 246
Top = 6 Top = 6
Width = 178 Width = 178
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6
DefaultItemHeight = 15
TabOrder = 0
OnDblClick = OkButtonClick
OnSelectionChanged = ItemsTreeViewSelectionChanged
end end
object DescriptionGroupBox: TGroupBox object DescriptionGroupBox: TGroupBox
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Caption = 'DescriptionGroupBox'
ClientHeight = 229
ClientWidth = 197
TabOrder = 1
AnchorSideLeft.Control = ItemsTreeView AnchorSideLeft.Control = ItemsTreeView
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
@ -39,45 +32,50 @@ object NewOtherDialog: TNewOtherDialog
Height = 246 Height = 246
Top = 6 Top = 6
Width = 201 Width = 201
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Caption = 'DescriptionGroupBox'
ClientHeight = 228
ClientWidth = 197
TabOrder = 1
object DescriptionLabel: TLabel object DescriptionLabel: TLabel
Left = 6
Height = 216
Top = 6
Width = 185
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'DescriptionLabel' Caption = 'DescriptionLabel'
Color = clNone
ParentColor = False ParentColor = False
WordWrap = True WordWrap = True
Left = 6
Height = 217
Top = 6
Width = 185
end end
end end
object CancelButton: TButton object CancelButton: TButton
Left = 299
Height = 25
Top = 265
Width = 92
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
BorderSpacing.InnerBorder = 4
Caption = 'CancelButton' Caption = 'CancelButton'
ModalResult = 2 ModalResult = 2
TabOrder = 2 TabOrder = 2
Left = 306
Height = 26
Top = 264
Width = 85
end end
object OkButton: TButton object OkButton: TButton
AnchorSideRight.Control = CancelButton
Left = 220
Height = 25
Top = 265
Width = 73
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
BorderSpacing.InnerBorder = 4
Caption = 'OkButton' Caption = 'OkButton'
Enabled = False Enabled = False
OnClick = OkButtonClick OnClick = OkButtonClick
TabOrder = 3 TabOrder = 3
AnchorSideRight.Control = CancelButton
Left = 239
Height = 26
Top = 264
Width = 61
end end
end end

View File

@ -1,28 +1,30 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TNewOtherDialog','FORMDATA',[ LazarusResources.Add('TNewOtherDialog','FORMDATA',[
'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#13'ActiveControl'#7#13'ItemsTre' 'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#4'Left'#3#225#1#6'Height'#3'('#1
+'eView'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#14'NewOtherDialog' +#3'Top'#3'j'#1#5'Width'#3#141#1#18'HorzScrollBar.Page'#3#140#1#18'VertScroll'
+#12'ClientHeight'#3'('#1#11'ClientWidth'#3#141#1#13'PixelsPerInch'#2'p'#8'Po' +'Bar.Page'#3''''#1#13'ActiveControl'#7#13'ItemsTreeView'#11'BorderStyle'#7#13
+'sition'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#140#1#18'VertScrollBa' +'bsSizeToolWin'#7'Caption'#6#14'NewOtherDialog'#12'ClientHeight'#3'('#1#11'C'
+'r.Page'#3''''#1#4'Left'#3#225#1#6'Height'#3'('#1#3'Top'#3'j'#1#5'Width'#3 +'lientWidth'#3#141#1#8'Position'#7#14'poScreenCenter'#0#9'TTreeView'#13'Item'
+#141#1#0#9'TTreeView'#13'ItemsTreeView'#7'Anchors'#11#5'akTop'#6'akLeft'#8'a' +'sTreeView'#4'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Width'#3#178#0#7'Anch'
+'kBottom'#0#20'BorderSpacing.Around'#2#6#17'DefaultItemHeight'#2#14#8'TabOrd' +'ors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#17'De'
+'er'#2#0#10'OnDblClick'#7#13'OkButtonClick'#18'OnSelectionChanged'#7#29'Item' +'faultItemHeight'#2#15#8'TabOrder'#2#0#10'OnDblClick'#7#13'OkButtonClick'#18
+'sTreeViewSelectionChanged'#4'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Width' +'OnSelectionChanged'#7#29'ItemsTreeViewSelectionChanged'#0#0#9'TGroupBox'#19
+#3#178#0#0#0#9'TGroupBox'#19'DescriptionGroupBox'#7'Anchors'#11#5'akTop'#6'a' +'DescriptionGroupBox'#22'AnchorSideLeft.Control'#7#13'ItemsTreeView'#19'Anch'
+'kLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#19 +'orSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'A'
+'DescriptionGroupBox'#12'ClientHeight'#3#229#0#11'ClientWidth'#3#197#0#8'Tab' +'nchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#190#0#6'Height'#3#246#0#3'Top'
+'Order'#2#1#22'AnchorSideLeft.Control'#7#13'ItemsTreeView'#19'AnchorSideLeft' +#2#6#5'Width'#3#201#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
+'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR' +#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'DescriptionGroupBox'#12'Clie'
+'ight.Side'#7#9'asrBottom'#4'Left'#3#190#0#6'Height'#3#246#0#3'Top'#2#6#5'Wi' +'ntHeight'#3#228#0#11'ClientWidth'#3#197#0#8'TabOrder'#2#1#0#6'TLabel'#16'De'
+'dth'#3#201#0#0#6'TLabel'#16'DescriptionLabel'#5'Align'#7#8'alClient'#20'Bor' +'scriptionLabel'#4'Left'#2#6#6'Height'#3#216#0#3'Top'#2#6#5'Width'#3#185#0#5
+'derSpacing.Around'#2#6#7'Caption'#6#16'DescriptionLabel'#5'Color'#7#6'clNon' +'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'Descripti'
+'e'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2#6#6'Height'#3#217#0#3'Top'#2#6 +'onLabel'#11'ParentColor'#8#8'WordWrap'#9#0#0#0#7'TButton'#12'CancelButton'#4
+#5'Width'#3#185#0#0#0#0#7'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight' +'Left'#3'+'#1#6'Height'#2#25#3'Top'#3#9#1#5'Width'#2'\'#7'Anchors'#11#7'akRi'
+#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'Ca' +'ght'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpac'
+'ncelButton'#11'ModalResult'#2#2#8'TabOrder'#2#2#4'Left'#3'2'#1#6'Height'#2 +'ing.InnerBorder'#2#4#7'Caption'#6#12'CancelButton'#11'ModalResult'#2#2#8'Ta'
+#26#3'Top'#3#8#1#5'Width'#2'U'#0#0#7'TButton'#8'OkButton'#7'Anchors'#11#7'ak' +'bOrder'#2#2#0#0#7'TButton'#8'OkButton'#23'AnchorSideRight.Control'#7#12'Can'
+'Right'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6 +'celButton'#4'Left'#3#220#0#6'Height'#2#25#3'Top'#3#9#1#5'Width'#2'I'#7'Anch'
+#8'OkButton'#7'Enabled'#8#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#23 +'ors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6
+'AnchorSideRight.Control'#7#12'CancelButton'#4'Left'#3#239#0#6'Height'#2#26#3 +#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#8'OkButton'#7'Enabled'#8#7'O'
+'Top'#3#8#1#5'Width'#2'='#0#0#0 +'nClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#0#0#0
]); ]);

View File

@ -188,6 +188,8 @@ begin
if (ANode = nil) or (ANode.Data = nil) or if (ANode = nil) or (ANode.Data = nil) or
(not (TObject(ANode.Data) is TNewIDEItemTemplate)) then (not (TObject(ANode.Data) is TNewIDEItemTemplate)) then
begin begin
// don't show message, when double clicking in treeview
if not (Sender is TTreeView) then
MessageDlg(lisNewDlgNoItemSelected, MessageDlg(lisNewDlgNoItemSelected,
lisNewDlgPleaseSelectAnItemFirst, mtInformation, [mbOK], 0); lisNewDlgPleaseSelectAnItemFirst, mtInformation, [mbOK], 0);
FNewItem := nil; FNewItem := nil;