Commits

Rodrigo Bistolfi committed 54bda36

Add last callbacks after enabling buttons (#14)

  • Participants
  • Parent commits 69897dd

Comments (0)

Files changed (1)

File vinstall/core/wizard.py

         """Present the current controller to the user and setup callbacks for
         running next. If optional render method is not present, call next()
         ourselves.
-        
+
         """
         if hasattr(self.current_controller, "render"):
             self.current_render = render = self.current_controller.render()
             self.current_render.main_window.set_next_button_label("Reboot")
             self.current_render.main_window.set_previous_button_label("Quit")
             self.current_render.main_window.enable_buttons()
+            self.current_render.main_window.clear_callbacks()
+            self.current_render.main_window.add_next_callback(self.reboot)
+            self.current_render.main_window.add_previous_callback(self.stop)
             #self.current_render.main_window.alert("Installation finished")
 
         processing.add_command(tasks_finished_callback, args=tuple(),
 
         controller = self.factory.make_controller_instance(ProcessingController)
         self.process_state(controller)
-        self.current_render.main_window.clear_callbacks()
-        self.current_render.main_window.add_next_callback(self.reboot)
-        self.current_render.main_window.add_previous_callback(self.stop)
         processing.execute_all()
 
     def start(self, first_controller):