[kupfer] data: Fix important bug with recording hits for third pane



commit 71b8562c6184d355d12c8f9f57005221c6e38fb1
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sat Dec 26 00:44:10 2009 +0100

    data: Fix important bug with recording hits for third pane
    
    We accidentally recorded (learned) used objects from the third pane,
    using an old selection, when the user only activated two-pane actions
    (only Object + Action).
    
    This solves an important learning bug.

 kupfer/data.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/data.py b/kupfer/data.py
index 1907b49..c8e93fc 100644
--- a/kupfer/data.py
+++ b/kupfer/data.py
@@ -1054,7 +1054,7 @@ class DataController (gobject.GObject, pretty.OutputMixin):
 		# register search to learning database
 		learn.record_search_hit(leaf, self.source_pane.get_latest_key())
 		learn.record_search_hit(action, self.action_pane.get_latest_key())
-		if sobject:
+		if sobject and self.mode is SourceActionObjectMode:
 			learn.record_search_hit(sobject, self.object_pane.get_latest_key())
 
 		def valid_result(obj):



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