Explorar el Código

Don't show the dialog with no capabilities

Clara Hobbs hace 7 años
padre
commit
83493dce78
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      pd-buddy-gtk.py

+ 4
- 0
pd-buddy-gtk.py Ver fichero

@@ -434,6 +434,10 @@ class Handler:
434 434
         with pdbuddy.Sink(self.serial_port) as pdbs:
435 435
             caps = pdbs.get_source_cap()
436 436
 
437
+        if not caps:
438
+            # If there are no capabilities, don't show a dialog
439
+            return
440
+
437 441
         # Create the dialog
438 442
         window = self.builder.get_object("pdb-window")
439 443
         dialog_builder = Gtk.Builder.new_from_file("data/src-cap-dialog.ui")

Loading…
Cancelar
Guardar