brands-d / kMap

kMap.py is a python based program for simulation and data analysis in photoemission tomography.
GNU General Public License v3.0
23 stars 9 forks source link

Error message when removing orbitals #53

Closed brands-d closed 3 years ago

brands-d commented 3 years ago

Loading orbitals (multiple) locally into orbital data tab -> removing them by pressing 'X' -> they get removed but this error message gets printed:

Traceback (most recent call last): File "/home/user/Desktop/kMap/kmap/controller/mainwindow.py", line 127, in load_cube_files_online tab.add_orbital_from_online(URL[0], URL[1]) File "/home/user/Desktop/kMap/kmap/controller/orbitaldatatab.py", line 55, in add_orbital_from_online self.add_orbital(orbital) File "/home/user/Desktop/kMap/kmap/controller/orbitaldatatab.py", line 73, in add_orbital self.refresh_plot() File "/home/dominik/Desktop/kMap/kmap/controller/orbitaldatatab.py", line 78, in refresh_plot data = self.model.update_displayed_plot_data() File "/home/user/Desktop/kMap/kmap/model/orbitaldatatab_model.py", line 60, in update_displayed_plot_data if self.controller.get_use(ID): File "/home/user/Desktop/kMap/kmap/controller/orbitaldatatab.py", line 117, in get_use return self.table.get_use_by_ID(ID) File "/home/user/Desktop/kMap/kmap/controller/orbitaltable.py", line 55, in get_use_by_ID index = self._ID_to_row_index(ID) File "/home/user/Desktop/kMap/kmap/controller/orbitaltable.py", line 105, in _ID_to_row_index raise IndexError('No data with this ID') IndexError: No data with this ID

Removing all orbitals leaves the last orbital still displayed.

brands-d commented 3 years ago

Fixed here d09e070. Same bug as in issue 54.