[views] fix an issue with the log view not updating when switching back from text

This commit is contained in:
Timothy Stack 2021-09-09 13:03:43 -07:00
parent d4d0a6165f
commit 7252e5fc0f
3 changed files with 2 additions and 4 deletions

View File

@ -13,7 +13,6 @@
;DELETE FROM lnav_view_stack WHERE rowid = $row_to_delete;
;SELECT name AS new_top_view_name FROM lnav_view_stack ORDER BY rowid DESC LIMIT 1;
;SELECT top_time AS old_top_time FROM lnav_views WHERE name = $new_top_view_name;
;SELECT $0, $1;
;UPDATE lnav_views SET top_time = $last_top_time WHERE
$1 = 'x51' AND
name = $new_top_view_name AND

View File

@ -503,7 +503,7 @@ public:
if (this->vs_change_handler) {
this->vs_change_handler(view);
}
view->set_needs_update();
this->set_needs_update();
}
void pop_back() {
@ -511,6 +511,7 @@ public:
if (!this->vs_views.empty() && this->vs_change_handler) {
this->vs_change_handler(this->vs_views.back());
}
this->set_needs_update();
}
iterator begin() {

View File

@ -493,8 +493,6 @@ bool toggle_view(textview_curses *toggle_tc)
lnav_data.ld_view_stack.push_back(toggle_tc);
retval = true;
}
tc = *lnav_data.ld_view_stack.top();
tc->set_needs_update();
return retval;
}