def fix_html(self, current): if current: ed = self.gui.central.current_editor if hasattr(ed, 'fix_html'): ed.fix_html() else: if not self.check_dirtied(): return self.add_savepoint(_('Fix HTML')) fix_all_html(current_container()) self.update_editors_from_container()
def fix_html(self, current): if current: ed = self.gui.central.current_editor if hasattr(ed, 'fix_html'): ed.fix_html() else: self.commit_all_editors_to_container() with BusyCursor(): self.add_savepoint(_('Fix HTML')) fix_all_html(current_container()) self.update_editors_from_container() self.set_modified()
def fix_html(self, current): if current: ed = self.gui.central.current_editor if hasattr(ed, 'fix_html'): ed.fix_html() else: if not self.check_dirtied(): return QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) try: self.add_savepoint(_('Fix HTML')) fix_all_html(current_container()) self.update_editors_from_container() self.set_modified() finally: QApplication.restoreOverrideCursor()