Update search bar after browsing.

develop
Warmist 2015-02-01 20:07:28 +02:00
parent 570381f059
commit c56d928dae
1 changed files with 5 additions and 2 deletions

@ -340,15 +340,17 @@ function GmEditorUi:pushTarget(target_to_push)
new_tbl.target=target_to_push
new_tbl.keys={}
new_tbl.selected=1
new_tbl.filter=""
if self:currentTarget()~=nil then
self:currentTarget().selected=self.subviews.list_main:getSelected()
self.stack[#self.stack].filter=self.subviews.filter_input.text
end
for k,v in pairs(target_to_push) do
table.insert(new_tbl.keys,k)
end
new_tbl.item_count=#new_tbl.keys
table.insert(self.stack,new_tbl)
self.subviews.filter_input.text=""
self:updateTarget()
end
function GmEditorUi:popTarget()
@ -357,6 +359,7 @@ function GmEditorUi:popTarget()
self:dismiss()
return
end
self.subviews.filter_input.text=self.stack[#self.stack].filter --restore filter
self:updateTarget()
end
function show_editor(trg)