Skip to content

Commit 16302fd

Browse files
FIX: Combobox text was not updated, when history was full -> result in empty directory view
1 parent 34b6ff8 commit 16302fd

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

unit1.lfm

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ object Form1: TForm1
99
ClientWidth = 777
1010
Constraints.MinHeight = 200
1111
Constraints.MinWidth = 400
12+
Position = poScreenCenter
13+
LCLVersion = '3.99.0.0'
1214
OnActivate = FormActivate
1315
OnClose = FormClose
1416
OnCloseQuery = FormCloseQuery
1517
OnCreate = FormCreate
1618
OnDropFiles = FormDropFiles
17-
Position = poScreenCenter
18-
LCLVersion = '2.3.0.0'
1919
object PairSplitter1: TPairSplitter
2020
Left = 50
2121
Height = 400
2222
Top = 50
2323
Width = 400
24-
OnResize = PairSplitter1Resize
2524
Position = 200
25+
OnResize = PairSplitter1Resize
2626
object PairSplitterSide1: TPairSplitterSide
2727
Cursor = crArrow
2828
Left = 0
@@ -45,18 +45,18 @@ object Form1: TForm1
4545
OnResize = Panel1Resize
4646
object cbDirLeft: TComboBox
4747
Left = 12
48-
Height = 27
49-
Top = 40
48+
Height = 28
49+
Top = 39
5050
Width = 148
5151
Anchors = [akLeft, akRight, akBottom]
5252
ItemHeight = 0
53+
PopupMenu = PopupMenu3
54+
TabOrder = 0
55+
TextHint = 'Directory left'
5356
OnDblClick = cbDirLeftDblClick
5457
OnKeyDown = cbDirLeftKeyDown
5558
OnKeyPress = cbDirLeftKeyPress
5659
OnSelect = cbDirLeftSelect
57-
PopupMenu = PopupMenu3
58-
TabOrder = 0
59-
TextHint = 'Directory left'
6060
end
6161
object btnDirLeft: TSpeedButton
6262
Left = 164
@@ -71,7 +71,7 @@ object Form1: TForm1
7171
end
7272
object ListView1: TListView
7373
Left = 0
74-
Height = 302
74+
Height = 301
7575
Top = 75
7676
Width = 200
7777
Align = alClient
@@ -106,8 +106,8 @@ object Form1: TForm1
106106
end
107107
object StatusBar1: TStatusBar
108108
Left = 0
109-
Height = 23
110-
Top = 377
109+
Height = 24
110+
Top = 376
111111
Width = 200
112112
Panels = <
113113
item
@@ -138,18 +138,18 @@ object Form1: TForm1
138138
OnResize = Panel2Resize
139139
object cbDirRight: TComboBox
140140
Left = 8
141-
Height = 27
142-
Top = 40
141+
Height = 28
142+
Top = 39
143143
Width = 148
144144
Anchors = [akLeft, akRight, akBottom]
145145
ItemHeight = 0
146+
PopupMenu = PopupMenu4
147+
TabOrder = 0
148+
TextHint = 'Directory right'
146149
OnDblClick = cbDirRightDblClick
147150
OnKeyDown = cbDirRightKeyDown
148151
OnKeyPress = cbDirRightKeyPress
149152
OnSelect = cbDirRightSelect
150-
PopupMenu = PopupMenu4
151-
TabOrder = 0
152-
TextHint = 'Directory right'
153153
end
154154
object btnDirRight: TSpeedButton
155155
Left = 160
@@ -164,8 +164,8 @@ object Form1: TForm1
164164
end
165165
object StatusBar2: TStatusBar
166166
Left = 0
167-
Height = 23
168-
Top = 377
167+
Height = 24
168+
Top = 376
169169
Width = 195
170170
Panels = <
171171
item
@@ -175,7 +175,7 @@ object Form1: TForm1
175175
end
176176
object ListView2: TListView
177177
Left = 0
178-
Height = 302
178+
Height = 301
179179
Top = 75
180180
Width = 195
181181
Align = alClient

unit1.pas

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(******************************************************************************)
22
(* CopyCommander2 15.02.2022 *)
33
(* *)
4-
(* Version : 0.10 *)
4+
(* Version : 0.11 *)
55
(* *)
66
(* Author : Uwe Schächterle (Corpsman) *)
77
(* *)
@@ -75,6 +75,8 @@
7575
(* einer Drop-Down-Liste angeboten, *)
7676
(* Die Liste kann via contextmenü gelöscht werden *)
7777
(* 0.10 = TODO im STRG+S Dialog implementiert *)
78+
(* 0.11 = FIX: Combobox text was not updated, when history was *)
79+
(* full -> result in empty directory view *)
7880
(* *)
7981
(******************************************************************************)
8082
(* Silk icon set 1.3 used *)
@@ -325,15 +327,17 @@
325327

326328
Procedure UpdateComboboxHistory(cb: TComboBox; maxCount: integer);
327329
Var
328-
directory: String;
330+
tmp, directory: String;
329331
Begin
330-
directory := IncludeTrailingPathDelimiter(cb.Text);
332+
tmp := cb.Text;
333+
directory := IncludeTrailingPathDelimiter(tmp);
331334
// DropDownListe füllen
332335
If (directory <> '') And (cb.Items.IndexOf(directory) < 0) Then // nur wenn noch nicht in Liste
333336
cb.Items.Insert(0, directory);
334337
// ggf Anzahl in Liste begrenzen
335338
If cb.Items.Count > MaxCount Then
336339
cb.Items.Delete(MaxCount);
340+
cb.Text := tmp;
337341
End;
338342

339343
(*
@@ -531,7 +535,7 @@
531535
(*
532536
* Historie : Siehe ganz oben
533537
*)
534-
Caption := 'Copycommander2 ver. 0.10';
538+
Caption := 'Copycommander2 ver. 0.11';
535539
(*
536540
* Mindest Anforderungen:
537541
* - Alle "Todo's" erledigt

0 commit comments

Comments
 (0)