[kupfer: 20/38] commatrick: Don't allow pushing duplicates to object stack
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 20/38] commatrick: Don't allow pushing duplicates to object stack
- Date: Sat, 16 Jan 2010 17:13:28 +0000 (UTC)
commit f727f20349b3d89584df47e2ab7246582aac6b88
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Fri Jan 15 17:58:20 2010 +0100
commatrick: Don't allow pushing duplicates to object stack
kupfer/core/data.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/core/data.py b/kupfer/core/data.py
index 1dd89b9..7d884f9 100644
--- a/kupfer/core/data.py
+++ b/kupfer/core/data.py
@@ -793,8 +793,9 @@ class DataController (gobject.GObject, pretty.OutputMixin):
if not self._has_object_stack(pane):
return
panectl = self._panectl_table[pane]
- panectl.object_stack_push(object_)
- self.emit("object-stack-changed", pane)
+ if object_ not in panectl.object_stack:
+ panectl.object_stack_push(object_)
+ self.emit("object-stack-changed", pane)
return True
def object_stack_pop(self, pane):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]