1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-20 18:27:40 +00:00

bug fixes storage mgr

This commit is contained in:
kepler155c@gmail.com
2017-04-22 00:51:27 -04:00
parent c57ff1541b
commit 8774d98009
5 changed files with 82 additions and 29 deletions

View File

@@ -48,12 +48,15 @@ function RefinedProvider:getCachedItemDetails(item)
detail.id = detail.name
detail.qty = detail.count
detail.display_name = detail.displayName
detail.nbtHash = item.nbtHash
self.cache[key] = detail
end
end
end
return detail
if detail then
return Util.shallowCopy(detail)
end
end
function RefinedProvider:listItems()

View File

@@ -1464,6 +1464,10 @@ end
function UI.Grid:setParent()
UI.Window.setParent(self)
self:update()
end
function UI.Grid:resize()
UI.Window.resize(self)
if not self.pageSize then
if self.disableHeader then
@@ -2287,6 +2291,7 @@ function UI.Tabs:setParent()
if child ~= self.tabBar then
child.y = 2
child.height = self.height - 1
child:resize()
end
end
end
@@ -3061,6 +3066,9 @@ function UI.Form:setValues(values)
self.values = values
for k,child in pairs(self.children) do
if child.formKey then
-- this should be child:setValue(self.values[child.formKey])
-- so chooser can set default choice if null
-- null should be valid as well
child.value = self.values[child.formKey] or ''
end
end

View File

@@ -91,13 +91,16 @@ function os.isPocket()
end
function os.getVersion()
local version
if _CC_VERSION then
return tonumber(_CC_VERSION)
version = tonumber(_CC_VERSION)
end
if _HOST then
return tonumber(_HOST:gmatch('[%d]+%.?[%d][%d]', '%1')())
version = tonumber(_HOST:gmatch('[%d]+%.?[%d][%d]', '%1')())
end
return 1.7
return version or 1.7
end
function os.registerApp(entry)