mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-03 00:20:39 +08:00
Fixed some more compiler warnings
This commit is contained in:
parent
ebd76383f4
commit
ae84f190c0
@ -6267,14 +6267,9 @@ static void render_sla_layer_legend(const SLAPrint& print, int layer_idx, int cn
|
|||||||
ImGui::SetNextWindowBgAlpha(0.6f);
|
ImGui::SetNextWindowBgAlpha(0.6f);
|
||||||
|
|
||||||
ImGuiPureWrap::begin(_u8L("Layer statistics"), ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing);
|
ImGuiPureWrap::begin(_u8L("Layer statistics"), ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing);
|
||||||
// FIXME: The snprintf would better be replaced by GUI::format, but I don't want to
|
ImGui::Text("%s", GUI::format(_u8L("Layer area: %1% mm²"), int(0.1 + std::round(area))).c_str());
|
||||||
// touch translated strings before the release.
|
|
||||||
char text[50];
|
|
||||||
snprintf(text, 50, _u8L("Layer area: %.0f mm²").c_str(), area);
|
|
||||||
ImGui::Text("%s", text);
|
|
||||||
int area_percent_int = int(std::round(100. * area/display_area));
|
int area_percent_int = int(std::round(100. * area/display_area));
|
||||||
snprintf(text, 50, GUI::format(_u8L("Area fill: %1% %%%%"), area_percent_int == 0 ? "<1" : std::to_string(area_percent_int)).c_str());
|
ImGui::Text("%s", GUI::format(_u8L("Area fill: %1% %%"), area_percent_int == 0 ? "<1" : std::to_string(area_percent_int)).c_str());
|
||||||
ImGui::Text("%s", text);
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text("%s", GUI::format(_u8L("Layer time: %1%"), get_time_dhms(time)).c_str());
|
ImGui::Text("%s", GUI::format(_u8L("Layer time: %1%"), get_time_dhms(time)).c_str());
|
||||||
std::string buffer_str = _u8L("Time since start: %1%");
|
std::string buffer_str = _u8L("Time since start: %1%");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user