The picture may help, but what you describe - Two button presses, the action of the second one waiting for the action of the first to complete - is certainly possible and not even that hard, but how to accomplish that objective with the code you've posted would be nearly impossible to determine. That's why I suggested breaking the problem down into a simpler context:
Write a simple app with 2 buttons, each with their own simple action. The architecture of the simple app should approximate the architecture of the code you posted in the relationships between the buttons and their actions, including any threading that is being done. Once we can see the relationships between the buttons, their activation and actions, threading used, and better understand why the second action should wait for the first to complete, we can suggest possible solutions. We can't suggest fixes to the code you've posted, because we can't understand from what you've shown or told us what is broken in that code, if anything.