aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_virtual_list_wx.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-05-28 12:11:11 +0200
committerSiri Hansen <[email protected]>2014-05-28 12:11:11 +0200
commitdfbfe7fa8256a3b78d12b8d92b94e955039ca20f (patch)
treeee289825dec2520722105f8f79804b2f45a3e559 /lib/observer/src/cdv_virtual_list_wx.erl
parent0d0d642ba596d4bb92549e01d29b7295bd5a4698 (diff)
parent235d02334181df0bed92b8c6af07d092627691fe (diff)
downloadotp-dfbfe7fa8256a3b78d12b8d92b94e955039ca20f.tar.gz
otp-dfbfe7fa8256a3b78d12b8d92b94e955039ca20f.tar.bz2
otp-dfbfe7fa8256a3b78d12b8d92b94e955039ca20f.zip
Merge branch 'maint'
Diffstat (limited to 'lib/observer/src/cdv_virtual_list_wx.erl')
-rw-r--r--lib/observer/src/cdv_virtual_list_wx.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/observer/src/cdv_virtual_list_wx.erl b/lib/observer/src/cdv_virtual_list_wx.erl
index c5a7d9a2e5..bfe115a42e 100644
--- a/lib/observer/src/cdv_virtual_list_wx.erl
+++ b/lib/observer/src/cdv_virtual_list_wx.erl
@@ -269,7 +269,7 @@ handle_event(#wx{event=#wxList{type=command_list_item_right_click,
MenuId = ?ID_DETAILS + Col,
ColText = call(Holder, {get_row, self(), Row, Col}),
case ColText of
- "[]" -> [];
+ Empty when Empty=="[]"; Empty=="" -> [];
_ ->
What =
case catch list_to_integer(ColText) of
@@ -284,8 +284,13 @@ handle_event(#wx{event=#wxList{type=command_list_item_right_click,
end
end,
MenuCols),
- wxWindow:popupMenu(Panel, Menu),
- wxMenu:destroy(Menu),
+ case MenuItems of
+ [] ->
+ wxMenu:destroy(Menu);
+ _ ->
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu)
+ end,
{noreply,State#state{menu_items=MenuItems}};
handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},