PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

[BUG] Tree nodes in location module stay populated + overwriting #365

Closed maggieer closed 1 month ago

maggieer commented 1 month ago

Describe the bug The selected tree nodes in the location module remain populated upon selecting "Save and add another". If the still-populated second location module is saved, it overwrites the first location module, but the pre-populated tree nodes do not save. Relation modules created directly from "Add associated Relation module" within the location module that were meant to be associated to the first module will instead associate with the second movement module. The error message provides some explanation of why, see below.

To Reproduce Steps to reproduce the behavior:

  1. Load any corpus
  2. Add a location module
  3. Populate with anything (error occurs with body, body-anchored or purely spatial signs)
  4. Click on 'Save and add another'
  5. See population of tree node selections

Expected behavior I expect all the selections to unpopulate upon saving and adding another module.

Error messages Traceback (most recent call last): File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\main.py", line 8, in <module> exit_code = appctxt.run() ^^^^^^^^^^^^^ File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\app.py", line 23, in run return self.app.exec_() ^^^^^^^^^^^^^^^^ File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\panel.py", line 801, in <lambda> self.location_button.clicked.connect(lambda: self.handle_menumodulebtn_clicked(ModuleTypes.LOCATION)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\panel.py", line 923, in handle_menumodulebtn_clicked module_selector.exec_() File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\modulespecification_dialog.py", line 277, in handle_button_click self.validate_and_save(addanother=True, closedialog=False) File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\modulespecification_dialog.py", line 329, in validate_and_save self.module_widget.clear() File "C:\Users\maggi\Documents\GitHub\SLPAA\src\main\python\gui\locationspecification_view.py", line 582, in clear self.clear_phonlocs_buttons() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'LocationSpecificationPanel' object has no attribute 'clear_phonlocs_buttons'

Operating system and SLP-AA version

kvesik commented 1 month ago

Thanks for this @maggieer ! I can't reproduce this on the current main branch. Can you please fetch & pull from main, and try again? @gracemyz merged a pull request late yesterday afternoon that I think fixes this bug.

maggieer commented 1 month ago

That did fix it, thanks @kvesik and @gracemyz!