Commits

Yuya Nishihara  committed 4ce20a4

mqdock: use activated signal to avoid race while building qqueue combo

Unlike currentIndexChanged, activated is emitted only if the user chooses
an item.

  • Participants
  • Parent commits c1979a6

Comments (0)

Files changed (1)

File tortoisehg/hgqt/mq.py

         self.cmd.progress.connect(self.progress)
         self.cmd.commandFinished.connect(self.onCommandFinished)
 
-        self.qqueueComboWidget.currentIndexChanged[QString].connect(
-            self.onQQueueSelected)
+        self.qqueueComboWidget.activated[QString].connect(
+            self.onQQueueActivated)
         self.qqueueConfigBtn.clicked.connect(self.onQQueueConfigClicked)
 
         self.queueListWidget.currentRowChanged.connect(self.onPatchSelected)
             self.setGuardsAct.setEnabled(False)
 
     @pyqtSlot(QString)
-    def onQQueueSelected(self, text):
-        if self.refreshing:
-            return
-
+    def onQQueueActivated(self, text):
         q = hglib.fromunicode(text)
         if q == self.repo.thgactivemqname:
             return