Skip to content

Commit

Permalink
Help Browser: Fix back button being visible when dialog opens
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Oct 24, 2018
1 parent 8dbd895 commit 67e4235
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/dialogs/help_browser.cpp
Expand Up @@ -224,7 +224,9 @@ void help_browser::on_topic_select(window& window)
history_.push_back(topic_id);
history_pos_ = std::prev(history_.end());

find_widget<button>(&window, "back", false).set_visible(widget::visibility::visible);
if(history_pos_ != history_.begin()) {
find_widget<button>(&window, "back", false).set_visible(widget::visibility::visible);
}
find_widget<button>(&window, "next", false).set_visible(widget::visibility::hidden);

const unsigned topic_i = parsed_pages_.at(topic_id);
Expand Down

0 comments on commit 67e4235

Please sign in to comment.