From 1f064bc16d32282fd4f55c9b2d24833593434a11 Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Wed, 17 Oct 2007 05:42:50 -0400
Subject: [PATCH] Make sure the currently selected row is re-selected after re-initializing the folder list.

---
 program/js/app.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index c33c346..68996ae 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2654,6 +2654,7 @@
     var refrow, form;
     var tbody = this.gui_objects.subscriptionlist.tBodies[0];
     var id = replace && replace.id ? replace.id : tbody.childNodes.length+1;
+    var selection = this.subscription_list.get_single_selection();
 
     if (!id || !(refrow = document.getElementById(refid)))
       {
@@ -2698,6 +2699,8 @@
 
     this.sort_subscription_list();
     this.init_subscription_list();
+    if (selection)
+      this.subscription_list.select_row(selection);
 
     if (document.getElementById('rcmrow'+id).scrollIntoView)
       document.getElementById('rcmrow'+id).scrollIntoView();

--
Gitblit v1.9.1