<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'># HG changeset patch<br># User K. Arvanitis <<a href="mailto:kosta@alumni.uvic.ca">kosta@alumni.uvic.ca</a>><br># Date 1422127655 28800<br># Sat Jan 24 11:27:35 2015 -0800<br># Node ID 5d6862d6275971cb7429ff14c8fd2a77c86506ef<br># Parent b25606106a9c0cd78f3cc5f602475da64cde081d<br>[PATCH] Fix Context-Menu Handler in Memory Editor<BR>This patch modified the behaviour of the button event handler<br>for the memory editor to properly select the underlying elements<br>of the treeview when using the right mouse button.<BR>Fixes #2249<BR>diff -r b25606106a9c -r 5d6862d62759 chirpui/memedit.py<br>--- a/chirpui/memedit.py Wed Jan 21 23:30:19 2015 -0800<br>+++ b/chirpui/memedit.py Sat Jan 24 11:27:35 2015 -0800<br>@@ -899,13 +899,17 @@<br> <br> def click_cb(self, view, event):<br> self.emit("usermsg", "")<br>- if event.button != 3:<br>- return False<br>-<br>- menu = self.make_context_menu()<br>- menu.popup(None, None, None, event.button, event.time)<br>-<br>- return True<br>+ if event.button == 3:<br>+ pathinfo = view.get_path_at_pos(int(event.x), int(event.y))<br>+ if pathinfo is not None:<br>+ path, col, x, y = pathinfo<br>+ view.grab_focus()<br>+ sel = view.get_selection()<br>+ if (not sel.path_is_selected(path)):<br>+ view.set_cursor(path, col)<br>+ menu = self.make_context_menu()<br>+ menu.popup(None, None, None, event.button, event.time)<br>+ return True<br> <br> def get_column_visible(self, col):<br> column = self.view.get_column(col)<br> <BR>                                            </div></body>
</html>