Help Browser: Fix back button being visible when dialog opens

This commit is contained in:
Celtic Minstrel 2017-04-10 14:55:07 -04:00 committed by Celtic Minstrel
parent 6144b5e778
commit bbf6df2ddf

View file

@ -217,7 +217,10 @@ void help_browser::on_topic_select()
history_.push_back(topic_id);
history_pos_ = std::prev(history_.end());
find_widget<button>(this, "back", false).set_visible(widget::visibility::visible);
if(history_pos_ != history_.begin()) {
find_widget<button>(this, "back", false).set_visible(widget::visibility::visible);
}
find_widget<button>(this, "next", false).set_visible(widget::visibility::hidden);
const unsigned topic_i = parsed_pages_.at(topic_id);