Refresh current path in filemanager after file operation

This behavior is more consistent when e.g. a file is moved to ".."
This commit is contained in:
Paulo Matias
2014-01-22 16:23:23 -02:00
parent 6c68041824
commit 1982e1154f
2 changed files with 7 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ function FileManager:init()
enabled = fileManager.clipboard and true or false,
callback = function()
pasteHere(file)
self:changeToPath(util.realpath(file):match("(.*/)"))
self:refreshPath()
UIManager:close(self.file_dialog)
end,
},
@@ -110,7 +110,7 @@ function FileManager:init()
callback = function()
local path = util.realpath(file)
deleteFile(file)
self:changeToPath(path:match("(.*/)"))
self:refreshPath()
UIManager:close(self.file_dialog)
end,
},

View File

@@ -63,7 +63,11 @@ end
function FileChooser:changeToPath(path)
path = util.realpath(path)
self.path = path
self:swithItemTable(nil, self:genItemTableFromPath(path))
self:refreshPath()
end
function FileChooser:refreshPath()
self:swithItemTable(nil, self:genItemTableFromPath(self.path))
end
function FileChooser:toggleHiddenFiles()