DSForLayers: Fixed a preview of estimated printer times

+ Fixed position of the "Layer statistics" window
This commit is contained in:
YuSanka 2024-05-23 16:18:15 +02:00 committed by Lukas Matena
parent ae84f190c0
commit b376919d83
2 changed files with 2 additions and 3 deletions

View File

@ -117,8 +117,7 @@ void DSForLayers::SetLayersTimes(const std::vector<double>& layers_times)
{
m_ticks.is_wipe_tower = false;
m_layers_times = layers_times;
for (size_t i = 1; i < m_layers_times.size(); i++)
m_layers_times[i] += m_layers_times[i - 1];
std::copy(layers_times.begin(), layers_times.end(), m_layers_times.begin());
}
void DSForLayers::SetDrawMode(bool is_sla_print, bool is_sequential_print)

View File

@ -6263,7 +6263,7 @@ static void render_sla_layer_legend(const SLAPrint& print, int layer_idx, int cn
const double time_until_layer = times[layer_idx];
ImGuiWrapper& imgui = *wxGetApp().imgui();
ImGuiPureWrap::set_next_window_pos(float(cnv_width) - imgui.get_style_scaling() * 5.f, imgui.get_style_scaling() * 55.f, ImGuiCond_Always, 1.0f, 0.0f);
ImGuiPureWrap::set_next_window_pos(float(cnv_width) - imgui.get_style_scaling() * 5.f, 5.f, ImGuiCond_Always, 1.0f, 0.0f);
ImGui::SetNextWindowBgAlpha(0.6f);
ImGuiPureWrap::begin(_u8L("Layer statistics"), ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing);