def okayToContinue(self):
        view, modelXbrl = self.getViewAndModelXbrl()
        documentIsModified = False
        if view is not None:
            try:
                # What follows only exists in ViewWinRenderedGrid
                view.updateInstanceFromFactPrototypes()
            except __HOLE__:
                pass
        if modelXbrl is not None:
            documentIsModified = modelXbrl.isModified()
        if not self.dirty and (not documentIsModified):
            return True
        reply = tkinter.messagebox.askokcancel(
                    _("arelle - Unsaved Changes"),
                    _("Are you sure to close the current instance without saving?\n (OK will discard changes.)"), 
                    parent=self.parent)
        if reply is None:
            return False
        else:
            return reply
dataset/ETHPy150Open Arelle/Arelle/arelle/CntlrWinMain.py/CntlrWinMain.okayToContinue