mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-01 18:49:38 +12:00
Replaced try & catch with early exit on NoneType
This should fix the issue without exception handling.
This commit is contained in:
parent
6fd6a68d9d
commit
b859631a50
|
@ -200,9 +200,9 @@ class plotTreeView(QTreeWidget):
|
||||||
|
|
||||||
def mouseDoubleClickEvent(self, event):
|
def mouseDoubleClickEvent(self, event):
|
||||||
item = self.currentItem()
|
item = self.currentItem()
|
||||||
|
if not item:
|
||||||
|
return
|
||||||
|
|
||||||
# Catching double clicks to forbid collapsing of toplevel items
|
# Catching double clicks to forbid collapsing of toplevel items
|
||||||
try:
|
if item.parent():
|
||||||
if item.parent():
|
QTreeWidget.mouseDoubleClickEvent(self, event)
|
||||||
QTreeWidget.mouseDoubleClickEvent(self, event)
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
|
|
Loading…
Reference in a new issue