Explorar o código

Replaced long line of code with for human friendly if/else statement. No functionality changes

cmerchant %!s(int64=6) %!d(string=hai) anos
pai
achega
ccff74073d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      labelme/widgets/label_dialog.py

+ 4 - 1
labelme/widgets/label_dialog.py

@@ -212,4 +212,7 @@ class LabelDialog(QtWidgets.QDialog):
         self.edit.setFocus(QtCore.Qt.PopupFocusReason)
         if move:
             self.move(QtGui.QCursor.pos())
-        return (self.edit.text(), self.getFlags() if self.flags else None) if self.exec_() else (None, None)
+        if self._exec():
+            return self.edit.text(), self.getFlags() if self.flags else None
+        else:
+            return None, None