chroming/pdfdir

[BUG]RuntimeError: wrapped C/C++ object of type QTreeWidgetItem has been deleted

proItheus opened this issue · 1 comments

复现步骤:

  1. 目录文本中输入至少两行内容
  2. 双击预览中的任意页码,进入编辑模式
  3. 再在目录文本中删除任意一行
  4. 点击预览中的任意条目
  5. 报错
File "./pdfdir/src/gui/base.py", line 92, in close_editor
    self.closePersistentEditor(self.last_item, self.last_column)
RuntimeError: wrapped C/C++ object of type QTreeWidgetItem has been deleted

应该是尝试关闭已经删除的条目导致的。应该在

pdfdir/src/gui/base.py, line 92

附近加个try catch就行?

感谢反馈,确实存在这个问题,重新生成预览树时选中的item没清空导致的,master分支已经修复了~