We've managed to trip a few of those on dimen fields post-init but
pre-paintTo in a few weird coner-cases, a point at which dimen is often
nil.
ConfigDialog: Deal with that very thing in update()
Fix#7656
-- NOTE: ReaderUI has a _getRunningInstance method for this, because it used to store the instance reference in a private module variable.
ifFileManager.instance==nilthen
logger.dbg("Spinning up new FileManager instance",tostring(self))
else
-- Should never happen, given what we did above...
logger.err("FileManager instance mismatch! Opened",tostring(self),"while we still have an existing instance:",tostring(FileManager.instance),debug.traceback())
end
FileManager.instance=self
end
end
functionFileChooser:onBack()
functionFileChooser:onBack()
@ -1168,15 +1177,6 @@ function FileManager:showFiles(path, focused_file)
focused_file=focused_file,
focused_file=focused_file,
}
}
UIManager:show(file_manager)
UIManager:show(file_manager)
-- NOTE: ReaderUI has a _getRunningInstance method for this, because it used to store the instance reference in a private module variable.
ifFileManager.instance==nilthen
logger.dbg("Spinning up new FileManager instance",tostring(file_manager))
else
-- Should never happen, given what we did above...
logger.warn("FileManager instance mismatch! Opened",tostring(file_manager),"while we still have an existing instance:",tostring(FileManager.instance))
-- for _, tzone in ipairs(self._ordered_touch_zones) do
-- for _, tzone in ipairs(self._ordered_touch_zones) do
-- print(" "..tzone.def.id)
-- print(" "..tzone.def.id)
-- end
-- end
ifReaderUI.instance==nilthen
logger.dbg("Spinning up new ReaderUI instance",tostring(self))
else
-- Should never happen, given what we did above...
logger.err("ReaderUI instance mismatch! Opened",tostring(self),"while we still have an existing instance:",tostring(ReaderUI.instance),debug.traceback())
end
ReaderUI.instance=self
end
end
functionReaderUI:setLastDirForFileBrowser(dir)
functionReaderUI:setLastDirForFileBrowser(dir)
@ -621,14 +629,6 @@ function ReaderUI:doShowReader(file, provider)
end
end
UIManager:show(reader,"full")
UIManager:show(reader,"full")
ifReaderUI.instance==nilthen
logger.dbg("Spinning up new ReaderUI instance",tostring(reader))
else
-- Should never happen, given what we did above...
logger.warn("ReaderUI instance mismatch! Opened",tostring(reader),"while we still have an existing instance:",tostring(ReaderUI.instance))
end
ReaderUI.instance=reader
end
end
-- NOTE: The instance reference used to be stored in a private module variable, hence the getter method.
-- NOTE: The instance reference used to be stored in a private module variable, hence the getter method.