From 064cbd7693786e7e0c78aef96cbed76c3e54e5a3 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 15 Apr 2016 09:17:32 +0200 Subject: [PATCH] post change --- post_frame.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/post_frame.lua b/post_frame.lua index 2f9fc1c..9d971d9 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -642,7 +642,9 @@ end function private.quantity_update() if selected_item then - private.stack_count_slider:SetMinMaxValues(1, selected_item.max_charges and selected_item.availability[private.stack_size_slider:GetValue()] or floor(selected_item.availability[0] / private.stack_size_slider:GetValue())) + local max_stack_count = selected_item.max_charges and selected_item.availability[private.stack_size_slider:GetValue()] or floor(selected_item.availability[0] / private.stack_size_slider:GetValue()) + private.stack_count_slider:SetMinMaxValues(1, max_stack_count) + private.stack_count_slider:SetValue(max_stack_count) end refresh = true end