[kupfer] commandexec: Fix bug in learning results for third pane



commit 9957066ba952111a10cb703179ae50109a82ed80
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Wed Jan 6 18:56:03 2010 +0100

    commandexec: Fix bug in learning results for third pane
    
    A regression in the commandexec work.

 kupfer/data.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/data.py b/kupfer/data.py
index d95bd43..98cbf4d 100644
--- a/kupfer/data.py
+++ b/kupfer/data.py
@@ -1039,6 +1039,7 @@ class DataController (gobject.GObject, pretty.OutputMixin):
 		action = self.action_pane.get_selection()
 		leaf = self.source_pane.get_selection()
 		sobject = self.object_pane.get_selection()
+		mode = self.mode
 		if not action or not leaf:
 			self.output_info("There is no selection!")
 			return
@@ -1051,7 +1052,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 and self.mode is SourceActionObjectMode:
+		if sobject and mode is SourceActionObjectMode:
 			learn.record_search_hit(sobject, self.object_pane.get_latest_key())
 		if res not in commandexec.RESULTS_SYNC:
 			self.emit("launched-action")



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