diff options
author | Henrik Nord <[email protected]> | 2015-06-10 14:57:27 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-06-10 14:57:32 +0200 |
commit | 09255039607a53e2a74aa8ee1c6972982d647518 (patch) | |
tree | 2a769689d56ee0784aededaafbaf6b82a76827b6 /lib/observer/src/observer_tv_wx.erl | |
parent | d8f343b234174d49bc66d5bddbe79f24400868e6 (diff) | |
parent | 93ba3a78f92c7e19997bd057e9ce1cdb4acd7b62 (diff) | |
download | otp-09255039607a53e2a74aa8ee1c6972982d647518.tar.gz otp-09255039607a53e2a74aa8ee1c6972982d647518.tar.bz2 otp-09255039607a53e2a74aa8ee1c6972982d647518.zip |
Merge branch 'gomoripeti/observer_tv_no_refresh'
* gomoripeti/observer_tv_no_refresh:
Don't refresh observer table view if there was no change
OTP-12819
Diffstat (limited to 'lib/observer/src/observer_tv_wx.erl')
-rw-r--r-- | lib/observer/src/observer_tv_wx.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl index da4cb8e041..acfa6a2a99 100644 --- a/lib/observer/src/observer_tv_wx.erl +++ b/lib/observer/src/observer_tv_wx.erl @@ -176,10 +176,16 @@ handle_call(Event, From, _State) -> handle_cast(Event, _State) -> error({unhandled_cast, Event}). -handle_info(refresh_interval, State = #state{node=Node, grid=Grid, opt=Opt}) -> - Tables = get_tables(Node, Opt), - Tabs = update_grid(Grid, Opt, Tables), - {noreply, State#state{tabs=Tabs}}; +handle_info(refresh_interval, State = #state{node=Node, grid=Grid, opt=Opt, + tabs=OldTabs}) -> + case get_tables(Node, Opt) of + OldTabs -> + %% no change + {noreply, State}; + Tables -> + Tabs = update_grid(Grid, Opt, Tables), + {noreply, State#state{tabs=Tabs}} + end; handle_info({active, Node}, State = #state{parent=Parent, grid=Grid, opt=Opt, timer=Timer0}) -> |