def focusInEvent(self, event): """ Test whether the file has been changed 'behind our back' """ # Act normally to the focus event BaseTextCtrl.focusInEvent(self, event) # Test file change self.testWhetherFileWasChanged()
def showEvent(self, event=None): """ Capture show event to change title. """ # Act normally if event: BaseTextCtrl.showEvent(self, event) # Make parser update pyzo.parser.parseThis(self)
def dropEvent(self, event): """ Drop files in the list. """ if event.mimeData().hasUrls(): # file: let the editorstack do the work. pyzo.editors.dropEvent(event) else: # text: act normal BaseTextCtrl.dropEvent(self, event)
def dragMoveEvent(self, event): """ Otherwise cursor can get stuck. https://bitbucket.org/iep-project/iep/issue/252 https://qt-project.org/forums/viewthread/3180 """ if event.mimeData().hasUrls(): event.acceptProposedAction() else: BaseTextCtrl.dropEvent(self, event)