From 483d2dd7ff59316d6740181d101676d2583940bd Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 7 Apr 2010 18:23:45 +0000 Subject: [PATCH] Reset last view defaults if number of categories changes svn: r15053 --- src/plugins/sidebar/categorysidebar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/sidebar/categorysidebar.py b/src/plugins/sidebar/categorysidebar.py index 22b5dfc55..b32ae42f5 100644 --- a/src/plugins/sidebar/categorysidebar.py +++ b/src/plugins/sidebar/categorysidebar.py @@ -172,6 +172,9 @@ class CategorySidebar(BaseSidebar): view_id = self.views[cat_num][view_num][0].id config.set('preferences.last-view', view_id) last_views = config.get('preferences.last-views') + if len(last_views) != len(self.views): + # If the number of categories has changed then reset the defaults + last_views = [''] * len(self.views) last_views[cat_num] = view_id config.set('preferences.last-views', last_views) config.save()