aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_pro_wx.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-12-21 14:14:11 +0100
committerDan Gudmundsson <[email protected]>2013-01-09 11:44:30 +0100
commit4400ec08aaa4c30272f502b5d8450dafec30f5dc (patch)
tree25e8a986294a7cc1d6793a68aaf3af5522b7a804 /lib/observer/src/observer_pro_wx.erl
parent60f0eeddd23306efa3d5993c320b31e7ce942464 (diff)
downloadotp-4400ec08aaa4c30272f502b5d8450dafec30f5dc.tar.gz
otp-4400ec08aaa4c30272f502b5d8450dafec30f5dc.tar.bz2
otp-4400ec08aaa4c30272f502b5d8450dafec30f5dc.zip
wx: Workaround wx-2.9 bugs
Menuhandling in 2.9 is (currently) buggy on mac, this avoids a crash in menu handling but causes a lot unusable menus.
Diffstat (limited to 'lib/observer/src/observer_pro_wx.erl')
-rw-r--r--lib/observer/src/observer_pro_wx.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl
index ee67664539..9aaf648ea2 100644
--- a/lib/observer/src/observer_pro_wx.erl
+++ b/lib/observer/src/observer_pro_wx.erl
@@ -225,7 +225,7 @@ handle_info({holder_updated, Count}, State0=#state{grid=Grid}) ->
State = update_selection(State0),
wxListCtrl:setItemCount(Grid, Count),
- wxListCtrl:refreshItems(Grid, 0, Count-1),
+ Count > 0 andalso wxListCtrl:refreshItems(Grid, 0, Count-1),
{noreply, State};