diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index ca95d42c..1d93cb67 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -1791,11 +1791,13 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI if (macroDragScroll>scrollMax) { macroDragScroll=scrollMax; } + ImGui::BeginDisabled(scrollMax<1); ImGui::SetNextItemWidth(availableWidth); if (CWSliderInt("##MacroScroll",¯oDragScroll,0,scrollMax,"")) { if (macroDragScroll<0) macroDragScroll=0; if (macroDragScroll>scrollMax) macroDragScroll=scrollMax; } + ImGui::EndDisabled(); // draw macros for (FurnaceGUIMacroDesc& i: macros) { @@ -1844,11 +1846,13 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI ImGui::TableNextRow(); ImGui::TableNextColumn(); ImGui::TableNextColumn(); + ImGui::BeginDisabled(scrollMax<1); ImGui::SetNextItemWidth(availableWidth); if (CWSliderInt("##MacroScroll",¯oDragScroll,0,scrollMax,"")) { if (macroDragScroll<0) macroDragScroll=0; if (macroDragScroll>scrollMax) macroDragScroll=scrollMax; } + ImGui::EndDisabled(); ImGui::EndTable(); } break;