mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-21 03:51:26 +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
1 changed files with 5 additions and 5 deletions
|
@ -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