Skip to content

Commit

Permalink
gui2/tgamestate_inspector: Only display N/M page indicators when M > 1
Browse files Browse the repository at this point in the history
It's not too common for WML containers to be exceed the 20000 characters
limit, so avoid displaying them with "1/1" page labels.
  • Loading branch information
irydacea committed Oct 8, 2014
1 parent 8c5ac3c commit ecd25dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/dialogs/gamestate_inspector.cpp
Expand Up @@ -252,8 +252,10 @@ class variable_mode_controller : public single_mode_controller
unsigned int num_pages = model_.get_num_page(config_to_string(c.cfg));
for (unsigned int i = 0; i < num_pages; i++) {
std::ostringstream cur_str;
cur_str << "[" << c.key << "][" << wml_array_sizes[c.key] << "] "
<< (i + 1) << "/" << num_pages;
cur_str << "[" << c.key << "][" << wml_array_sizes[c.key] << "]";
if (num_pages > 1) {
cur_str << " " << (i + 1) << "/" << num_pages;
}
model_.add_row_to_stuff_list(cur_str.str(), cur_str.str());
}
}
Expand Down

0 comments on commit ecd25dc

Please sign in to comment.