Commit ce9f01042879d47cf60dd516a8b4d68da320c441
Committed by
GitHub
1 parent
aee6346d
Exists in
master
FIX: Initialize pedal before creating Panel (#313)
- The Panel layout differs depending on if the pedal is in use or not, therefore the pedal needs to be initialized before the panel is created.
Showing
1 changed file
with
5 additions
and
6 deletions
Show diff stats
app.py
... | ... | @@ -359,12 +359,6 @@ def use_cmd_optargs(options, args): |
359 | 359 | session = ses.Session() |
360 | 360 | session.debug = 1 |
361 | 361 | |
362 | - # If use-pedal argument... | |
363 | - if options.use_pedal: | |
364 | - from invesalius.net.pedal_connection import PedalConnection | |
365 | - | |
366 | - PedalConnection().start() | |
367 | - | |
368 | 362 | # If import DICOM argument... |
369 | 363 | if options.dicom_dir: |
370 | 364 | import_dir = options.dicom_dir |
... | ... | @@ -512,6 +506,11 @@ def main(): |
512 | 506 | remote_control = RemoteControl(options.remote_host) |
513 | 507 | remote_control.connect() |
514 | 508 | |
509 | + if options.use_pedal: | |
510 | + from invesalius.net.pedal_connection import PedalConnection | |
511 | + | |
512 | + PedalConnection().start() | |
513 | + | |
515 | 514 | if options.no_gui: |
516 | 515 | non_gui_startup(options, args) |
517 | 516 | else: | ... | ... |