[bugfix] Error when getEventFromPath returned None
This commit is contained in:
parent
a0633cafa4
commit
71da6ded2b
@ -1868,11 +1868,12 @@ class TuneAutopicker(QWidget):
|
|||||||
path = self.eventBox.itemText(index)
|
path = self.eventBox.itemText(index)
|
||||||
if project.getEventFromPath(path).isTestEvent():
|
if project.getEventFromPath(path).isTestEvent():
|
||||||
for index in range(nevents):
|
for index in range(nevents):
|
||||||
path = self.eventBox.itemText(index)
|
path = self.eventBox.itemText(index)
|
||||||
if not project.getEventFromPath(index).isTestEvent():
|
if project.getEventFromPath(index):
|
||||||
break
|
if not project.getEventFromPath(index).isTestEvent():
|
||||||
#in case all events are marked as test events
|
break
|
||||||
elif index == nevents - 1:
|
#in case all events are marked as test events and last event is reached
|
||||||
|
if index == nevents - 1:
|
||||||
index = -1
|
index = -1
|
||||||
self.eventBox.setCurrentIndex(index)
|
self.eventBox.setCurrentIndex(index)
|
||||||
if not index == index_start:
|
if not index == index_start:
|
||||||
|
Loading…
Reference in New Issue
Block a user