Hi, it is me again
I don't know if this feature is intended or not (that is why I couldn't decide between feature or bug) but whenever a selected view in a panel is removed, the next view is selected, in a circular list fashion. Imho a stack behavior would be more useful here, maintaining the order of, for example, multiple layers of dialogs.
My suggestion would be to add an optional flag in the panel:remove() function so that one willing to apply this behavior to a dialog (like in my case) would be able to do it by simply overwriting the dialog:quit() function as such:
-- remove view
function panel:remove(v, stackish)
(...)
-- select next view
if self:current() == v then
if stackish then self:select_prev() else self:select_next(nil, true) end
end
(...)
end
then one would be able to write its own dialog:quit() function like so
dialog.quit = function (self)
local parent = self:parent()
if parent then
self:action_on(action.ac_on_exit)
parent:remove(self, true)
end
end
If you dont think it is worth the trouble, though, I am happy to continue hacking my way through this beautiful code
Hi, it is me again I don't know if this feature is intended or not (that is why I couldn't decide between feature or bug) but whenever a selected view in a panel is removed, the next view is selected, in a circular list fashion. Imho a stack behavior would be more useful here, maintaining the order of, for example, multiple layers of dialogs.
My suggestion would be to add an optional flag in the
panel:remove()
function so that one willing to apply this behavior to a dialog (like in my case) would be able to do it by simply overwriting thedialog:quit()
function as such:then one would be able to write its own
dialog:quit()
function like soIf you dont think it is worth the trouble, though, I am happy to continue hacking my way through this beautiful code