Apro_gen demo application: correct button enabling/disabling during the calculation