'Replace tabs by spaces'

def fix_indentation(self):

    text_before = to_text_string(self.toPlainText())
    text_after = sourcecode.fix_indentation(text_before)
    if (text_before != text_after):
        self.setPlainText(text_after)
        self.document().setModified(True)
