Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

mq: kill closeEvent on MQPatchesWidget

This gets called when the user closes the docking window, but
the MQPatchesWidget still stays araound anyway. If the window
is shown again, we had self.repo set to None, which is wrong
and caused a traceback

Traceback (most recent call last):
File "C:\Users\adi\hgrepos\thg-qt\tortoisehg\hgqt\mq.py", line 398, in onPatchSelected
applied = set([p.name for p in self.repo.mq.applied])
AttributeError: 'NoneType' object has no attribute 'mq'

as soon as a patch got selected again.

We simply don't need to do anything on closeEvent.

Changeset 17df0b2bde85

Parent cc4d1b8aeaab

by Adrian Buehlmann

Changes to one file · Browse files at 17df0b2bde85 Showing diff from parent cc4d1b8aeaab Diff from another changeset...

 
148
149
150
151
152
153
154
155
156
157
158
159
160
 
148
149
150
 
 
 
 
 
 
 
151
152
153
@@ -148,13 +148,6 @@
  self.repo.repositoryChanged.connect(self.onRepositoryChanged)   QTimer.singleShot(0, self.reload)   - def closeEvent(self, event): - if self.repo: - self.repo.configChanged.disconnect(self.onConfigChanged) - self.repo.repositoryChanged.disconnect(self.onRepositoryChanged) - self.repo = None - super(MQPatchesWidget, self).closeEvent(event) -   def getUserOptions(self, *optionlist):   out = []   for opt in optionlist: