PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

canceling new sign results in error working with most recent sign #263

Closed kvesik closed 7 months ago

kvesik commented 7 months ago

To reproduce:

  1. Open an existing corpus, or create at least one sign in a blank corpus.
  2. Click the "new sign" icon.
  3. Cancel out of the sign-level info dialog.
  4. Click any of the buttons to create a new module (presumably, for the last sign that was highlighted before you started - and then canceled - creating a new sign.
  5. bug: nothing happens on screen, and the terminal produces the error output below... so it seems that starting to create the new sign removes focus/selection from the previously-selected sign in the corpus, but when the new sign is canceled the focus/selection doesn't get returned to its previous state

Traceback (most recent call last): File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\main.py", line 8, in exitcode = appctxt.run() ^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\app.py", line 15, in run return self.app.exec() ^^^^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\panel.py", line 810, in self.relation_button.clicked.connect(lambda: self.handle_menumodulebtn_clicked(ModuleTypes.RELATION)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\panel.py", line 934, in handle_menumodulebtn_clicked xslotstructure=self.mainwindow.current_sign.xslotstructure, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'xslotstructure' Traceback (most recent call last): File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\main.py", line 8, in exitcode = appctxt.run() ^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\app.py", line 15, in run return self.app.exec() ^^^^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\panel.py", line 810, in self.relation_button.clicked.connect(lambda: self.handle_menumodulebtn_clicked(ModuleTypes.RELATION)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kvesik\Documents\School\RA-KCH\GitHub\SLPAA\src\main\python\gui\panel.py", line 934, in handle_menumodulebtn_clicked xslotstructure=self.mainwindow.current_sign.xslotstructure, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'xslotstructure'