Skip to content

Commit

Permalink
Merge pull request #351 from Micheus/mv/v2.2.2-fix-segment-submenu-lo…
Browse files Browse the repository at this point in the history
…cation

Fixed the wrong location for uv segmentation submenu.
  • Loading branch information
dgud committed Feb 5, 2019
2 parents 8721aab + 0fe8acb commit b2981d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wings_menu.erl
Expand Up @@ -356,7 +356,9 @@ popup_event_handler({click, Id, Click, Ns}, {Parent,Owner}=Own, Entries0) ->
case popup_result(lists:keyfind(Id, 2, Entries0), Click, Ns, Owner) of
pop -> pop;
{submenu, Names, Menus, MagnetClick} ->
{_, X, Y} = wings_io:get_mouse_state(),
{_, X0, Y0} = wings_io:get_mouse_state(),
Pos = wxWindow:screenToClient(wings_wm:this_win(), {X0,Y0}),
{X,Y} = wxWindow:clientToScreen(wings_wm:this_win(), Pos),
Entries = wx_popup_menu(Parent, {X,Y}, Names, Menus, MagnetClick, Owner),
{replace, fun(Ev) -> popup_event_handler(Ev, Own, Entries) end}
end;
Expand Down

0 comments on commit b2981d1

Please sign in to comment.