code: def setModified(self, isModified: bool):
          
          if not isModified:
              self.qteUndoStack.saveState()
          super().setModified(isModified)
docs: Set the modified state to ``isModified``.
  
          From a programmer's perspective this method does the same as
          the native ``QsciScintilla`` method but also ensures that the
          undo framework knows when the document state was changed.
  
          |Args|
  
          * ``isModified`` (**bool**): whether or not the document is considered
            unmodified.
  
          |Returns|
  
          **None**
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.