Don't call erase_data_content from tui_data_window::show_registers

tui_data_window::show_registers currently calls erase_data_content.
However, I think it's better to have fewer calls to this (ideally just
one would suffice).  This refactors that function to remove this call.

gdb/ChangeLog
2019-10-09  Tom Tromey  <tom@tromey.com>

	* tui/tui-regs.c (tui_data_window::show_registers): Don't call
	erase_data_content.
This commit is contained in:
Tom Tromey 2019-10-01 17:42:17 -06:00
parent 7523da63ca
commit a31bff9d2d
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2019-10-09 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::show_registers): Don't call
erase_data_content.
2019-10-09 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h (tui_delete_win): Don't declare.

View File

@ -154,13 +154,14 @@ tui_data_window::show_registers (struct reggroup *group)
for (auto &&data_item_win : m_regs_content)
data_item_win.highlight = false;
m_current_group = group;
rerender ();
}
else
{
m_current_group = 0;
erase_data_content (_("[ Register Values Unavailable ]"));
m_regs_content.clear ();
}
rerender ();
}