Skip to content

Commit

Permalink
statistics_dialog: Rename column id and struct member after last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jostephd committed Jul 9, 2019
1 parent a3efd28 commit 84c6467
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 2 additions & 4 deletions data/gui/window/statistics_dialog.cfg
Expand Up @@ -216,8 +216,7 @@
horizontal_grow = false

[label]
# This column is empty in the damage table
id = "overall_percent"
id = "overall_score"
definition = "default_small"
text_alignment = "right"
use_markup = true
Expand Down Expand Up @@ -266,8 +265,7 @@
horizontal_grow = false

[label]
# This column is empty in the damage table
id = "this_turn_percent"
id = "this_turn_score"
definition = "default_small"
text_alignment = "right"
use_markup = true
Expand Down
14 changes: 7 additions & 7 deletions src/gui/dialogs/statistics_dialog.cpp
Expand Up @@ -174,7 +174,7 @@ void statistics_dialog::add_damage_row(
data.emplace("damage_overall", item);

item["label"] = "";
data.emplace("overall_percent", item);
data.emplace("overall_score", item);

if(show_this_turn) {
label& this_turn_header = find_widget<label>(&window, "damage_this_turn_header", false);
Expand All @@ -184,7 +184,7 @@ void statistics_dialog::add_damage_row(
data.emplace("damage_this_turn", item);

item["label"] = "";
data.emplace("this_turn_percent", item);
data.emplace("this_turn_score", item);
} else {
// TODO: Setting the label to "" causes "This Turn" not to be drawn when changing back to the current scenraio view, so set the label to " " (a single space) instead.
label& this_turn_header = find_widget<label>(&window, "damage_this_turn_header", false);
Expand All @@ -200,7 +200,7 @@ struct hitrate_table_element
// The string with <actual number of hits>/<expected number of hits>
std::string hitrate_str;
// The string with the a priori probability of that result
std::string percentage_str;
std::string pvalue_str;
};

// Return the strings to use in the "Hits" table, showing actual and expected number of hits.
Expand Down Expand Up @@ -317,8 +317,8 @@ void statistics_dialog::add_hits_row(
element = tally(by_cth, more_is_better);
item["label"] = element.hitrate_str;
data.emplace("hits_overall", item);
item["label"] = element.percentage_str;
data.emplace("overall_percent", item);
item["label"] = element.pvalue_str;
data.emplace("overall_score", item);

if(show_this_turn) {
label& this_turn_header = find_widget<label>(&window, "hits_this_turn_header", false);
Expand All @@ -327,8 +327,8 @@ void statistics_dialog::add_hits_row(
element = tally(turn_by_cth, more_is_better);
item["label"] = element.hitrate_str;
data.emplace("hits_this_turn", item);
item["label"] = element.percentage_str;
data.emplace("this_turn_percent", item);
item["label"] = element.pvalue_str;
data.emplace("this_turn_score", item);
} else {
// TODO: Setting the label to "" causes "This Turn" not to be drawn when changing back to the current scenraio view, so set the label to " " (a single space) instead.
label& this_turn_header = find_widget<label>(&window, "hits_this_turn_header", false);
Expand Down

0 comments on commit 84c6467

Please sign in to comment.