[kupfer] data: Allow SecondaryObjectPane to have TextSource root



commit 54237e40083e472b9c9a716af7352e69cbe62349
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Wed Sep 9 18:23:53 2009 +0200

    data: Allow SecondaryObjectPane to have TextSource root
    
    We allow text source root by including the root when in text mode if
    it is a text source.

 kupfer/data.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/data.py b/kupfer/data.py
index 848227d..2a087d2 100644
--- a/kupfer/data.py
+++ b/kupfer/data.py
@@ -640,7 +640,9 @@ class SecondaryObjectPane (LeafPane):
 		filter for action @item
 		"""
 		self.latest_key = key
-		sources = [ self.get_source() ] if not text_mode else []
+		sources = []
+		if not text_mode or isinstance(self.get_source(), objects.TextSource):
+			sources.append(self.get_source())
 		if key and self.is_at_source_root():
 			# Only use text sources when we are at root catalog
 			sc = GetSourceController()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]