bbreslauer / PySciPlot

GNU General Public License v3.0
1 stars 0 forks source link

cannot save project after table is removed #20

Closed bbreslauer closed 13 years ago

bbreslauer commented 13 years ago

If a table is removed, it still exists somewhere in the program, and so you get the following when trying to save the project (at least if you are saving the project for the first time).

Traceback (most recent call last):
  File "/home/ben/programming/pysciplot-git/src/Pysciplot.py", line 183, in saveProject
self.saveProjectAs()
  File "/home/ben/programming/pysciplot-git/src/Pysciplot.py", line 171, in saveProjectAs
Save.writeProjectToFile(self, fileName)
  File "/home/ben/programming/pysciplot-git/src/Save.py", line 47, in writeProjectToFile
    getTables(app, dom, appWindowList)
  File "/home/ben/programming/pysciplot-git/src/Save.py", line 132, in getTables
    getTable(app, dom, appWindowList, tables, table)
  File "/home/ben/programming/pysciplot-git/src/Save.py", line 151, in getTable
tableName.appendChild(dom.createTextNode(str(tableObj.widget().name())))
RuntimeError: underlying C/C++ object has been deleted
bbreslauer commented 13 years ago

Only happens if the table has previously been saved.

bbreslauer commented 13 years ago

Only tables that were saved the first time around would be saved in later save operations because the Save.getTables method was not getting a complete list of tables every time save was called.

bbreslauer commented 13 years ago

Fixed.