From a99e4e963d5b8773bb4d775343abf4c24a16ec78 Mon Sep 17 00:00:00 2001 From: Angel Fernandez Date: Fri, 21 Oct 2016 11:57:11 +0200 Subject: [PATCH] Manage similar tabs on favorites menu issue3940 review30641002 --- tryton/gui/main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tryton/gui/main.py b/tryton/gui/main.py index 74ec11e522..609b1552c9 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -678,10 +678,14 @@ class Main(object): return False def _action_favorite(widget, id_): - Action.exec_keyword('tree_open', { - 'model': self.menu_screen.model_name, - 'id': id_, - 'ids': [id_], + event = gtk.get_current_event() + allow_similar = (event.state & gtk.gdk.MOD1_MASK or + event.state & gtk.gdk.SHIFT_MASK) + with Window(allow_similar=allow_similar): + Action.exec_keyword('tree_open', { + 'model': self.menu_screen.model_name, + 'id': id_, + 'ids': [id_], }) def _manage_favorites(widget):