diff options
author | Dan Gudmundsson <[email protected]> | 2011-12-05 16:02:54 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2011-12-05 16:02:54 +0100 |
commit | b0121557d6a97c22f147db665788132c2b2096d1 (patch) | |
tree | b85d682e3ca02b59201fa92154e12cf2fd1ab6cc /lib/observer/src/observer_app_wx.erl | |
parent | 6bbe0512b1686f06489893479ae1d14ef15d004a (diff) | |
download | otp-b0121557d6a97c22f147db665788132c2b2096d1.tar.gz otp-b0121557d6a97c22f147db665788132c2b2096d1.tar.bz2 otp-b0121557d6a97c22f147db665788132c2b2096d1.zip |
[observer] Move rpc calls to runtime tools
Diffstat (limited to 'lib/observer/src/observer_app_wx.erl')
-rw-r--r-- | lib/observer/src/observer_app_wx.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl index 4f35a93004..62046577ad 100644 --- a/lib/observer/src/observer_app_wx.erl +++ b/lib/observer/src/observer_app_wx.erl @@ -255,6 +255,11 @@ handle_info({delivery, Pid, app_ctrl, _, Apps0}, wxListBox:appendStrings(LBox, [App || App <- lists:sort(Apps)]), {noreply, State}; +handle_info({delivery, _Pid, app, _Curr, {[], [], [], []}}, + State = #state{panel=Panel}) -> + wxWindow:refresh(Panel), + {noreply, State#state{app=undefined, sel=undefined}}; + handle_info({delivery, Pid, app, Curr, AppData}, State = #state{panel=Panel, appmon=Pid, current=Curr, app_w=AppWin, paint=#paint{font=Font}}) -> @@ -356,11 +361,10 @@ build_tree({Root, P2Name, Links, XLinks0}, Font) -> {_, Tree0} = build_tree2(Root, Lookup, Name2P, Font), {Tree, Dim} = calc_tree_size(Tree0), Fetch = fun({From, To}, Acc) -> - case gb_trees:lookup(To, Name2P) of - {value, ToPid} -> - FromPid = gb_trees:get(From, Name2P), - [{locate_box(FromPid, [Tree]),locate_box(ToPid, [Tree])}|Acc]; - none -> + try {value, ToPid} = gb_trees:lookup(To, Name2P), + FromPid = gb_trees:get(From, Name2P), + [{locate_box(FromPid, [Tree]),locate_box(ToPid, [Tree])}|Acc] + catch _:_ -> Acc end end, |