summaryrefslogtreecommitdiff
path: root/UConnectionManager.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UConnectionManager.pas')
-rw-r--r--UConnectionManager.pas7
1 files changed, 5 insertions, 2 deletions
diff --git a/UConnectionManager.pas b/UConnectionManager.pas
index a730026..0fbb4d1 100644
--- a/UConnectionManager.pas
+++ b/UConnectionManager.pas
@@ -153,7 +153,7 @@ begin
ListView.OnSelectionChanged := ListViewSelectionChanged;
ListView.OnDblClick := ListViewDblClick;
ListView.SetFocus;
- if ListView.Items.Count > 0 then ListView.Items[0].SetCursor(0, False, False, 0, 0);
+ if ListView.Items.Count > 0 then ListView.Items[ConfConnMgrActiveItem].SetCursor(0, False, False, 0, 0);
ListViewSelectionChanged(Self);
AddConnectionButton.OnClick := AddConnectionButtonClick;
EditButton.OnClick := EditButtonClick;
@@ -291,6 +291,8 @@ var i: integer;
Item: TGTKListItem;
ConnMgrItem: TConnMgrItem;
begin
+ ReadConnections;
+
if ConnectionMgrList.Count > 0 then
for i := 0 to ConnectionMgrList.Count - 1 do begin
ConnMgrItem := ConnectionMgrList[i];
@@ -300,7 +302,8 @@ begin
Item.SetValue(2, ConstructURI(True, ConnMgrItem.ServiceType, ConnMgrItem.Server, ConnMgrItem.Username,
ConnMgrItem.Password, ConnMgrItem.TargetDir));
end;
-
+ if (ConfConnMgrActiveItem < 0) or (ConfConnMgrActiveItem > ConnectionMgrList.Count) then
+ ConfConnMgrActiveItem := 0;
end;