menu: onPress() must be executed after menu is removed

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent 2eef7755a5
commit f8612a0dbe
+3 -2
View File
@@ -109,9 +109,10 @@ void MenuBody::onPress(size_t index)
else
setIndex(index);
} else {
setIndex(index);
lines[index].onPress();
// delete menu first to avoid
// focus issues with onPress()
menu->deleteLater();
lines[index].onPress();
}
}
}