Fixed localization on preview's legend button

This commit is contained in:
enricoturri1966 2020-11-24 09:23:33 +01:00
parent 0fc1929076
commit 4736408a46

View file

@ -2783,7 +2783,7 @@ void GCodeViewer::render_legend() const
ImGui::SameLine(); ImGui::SameLine();
imgui.text(short_time(get_time_dhms(time_mode.time))); imgui.text(short_time(get_time_dhms(time_mode.time)));
auto show_mode_button = [this, &imgui](const std::string& label, PrintEstimatedTimeStatistics::ETimeMode mode) { auto show_mode_button = [this, &imgui](const wxString& label, PrintEstimatedTimeStatistics::ETimeMode mode) {
bool show = false; bool show = false;
for (size_t i = 0; i < m_time_statistics.modes.size(); ++i) { for (size_t i = 0; i < m_time_statistics.modes.size(); ++i) {
if (i != static_cast<size_t>(mode) && if (i != static_cast<size_t>(mode) &&
@ -2803,11 +2803,11 @@ void GCodeViewer::render_legend() const
switch (m_time_estimate_mode) { switch (m_time_estimate_mode) {
case PrintEstimatedTimeStatistics::ETimeMode::Normal: { case PrintEstimatedTimeStatistics::ETimeMode::Normal: {
show_mode_button(_u8L("Show stealth mode"), PrintEstimatedTimeStatistics::ETimeMode::Stealth); show_mode_button(_L("Show stealth mode"), PrintEstimatedTimeStatistics::ETimeMode::Stealth);
break; break;
} }
case PrintEstimatedTimeStatistics::ETimeMode::Stealth: { case PrintEstimatedTimeStatistics::ETimeMode::Stealth: {
show_mode_button(_u8L("Show normal mode"), PrintEstimatedTimeStatistics::ETimeMode::Normal); show_mode_button(_L("Show normal mode"), PrintEstimatedTimeStatistics::ETimeMode::Normal);
break; break;
} }
} }