From 4400ec08aaa4c30272f502b5d8450dafec30f5dc Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 21 Dec 2012 14:14:11 +0100 Subject: 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. --- lib/observer/src/observer_pro_wx.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/observer/src/observer_pro_wx.erl') 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}; -- cgit v1.2.3