From a732e72ab95bf6cd66f0429664f265fc2ea808f6 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 25 May 2023 14:38:40 +0200 Subject: [PATCH] Fixed with of feature type combo in preview legend, broken after recent changes into ImGuiWrapper::combo() --- src/slic3r/GUI/GCodeViewer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index e941ca420..9421e8ca7 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -3575,9 +3575,6 @@ void GCodeViewer::render_legend(float& legend_height) int old_view_type = static_cast(get_view_type()); int view_type = old_view_type; - if (!m_legend_resizer.dirty) - ImGui::SetNextItemWidth(-1.0f); - ImGui::PushStyleColor(ImGuiCol_FrameBg, { 0.1f, 0.1f, 0.1f, 0.8f }); ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, { 0.2f, 0.2f, 0.2f, 0.8f }); imgui.combo(std::string(), { _u8L("Feature type"), @@ -3590,7 +3587,7 @@ void GCodeViewer::render_legend(float& legend_height) _u8L("Layer time (linear)"), _u8L("Layer time (logarithmic)"), _u8L("Tool"), - _u8L("Color Print") }, view_type, ImGuiComboFlags_HeightLargest); + _u8L("Color Print") }, view_type, ImGuiComboFlags_HeightLargest, 0.0f, -1.0f); ImGui::PopStyleColor(2); if (old_view_type != view_type) {