+ assert (act);
+
+ tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ assert (tact);
+
+ if (!tact->get_active()) {
+ /* this was just the notification that the old mode has been
+ * left. we'll get called again with the new mode active in a
+ * jiffy.
+ */
+ return;
+ }
+
+ switch (m) {
+ case MouseDraw:
+ act = ActionManager::get_action (X_("MouseMode"), X_("toggle-internal-edit"));
+ tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ tact->set_active (true);
+ break;
+ default:
+ break;
+ }
+
+ if (_session && mouse_mode == MouseAudition) {
+ /* stop transport and reset default speed to avoid oddness with
+ auditioning */
+ _session->request_transport_speed (0.0, true);
+ }
+
+ mouse_mode = m;
+
+ instant_save ();
+
+ //TODO: set button styles for smart buttons
+/*
+ if ( smart_mode_action->get_active() ) {
+ if( mouse_mode == MouseObject ) { //smart active and object active
+ smart_mode_button.set_active(1);
+ smart_mode_button.set_name("smart mode button");
+ mouse_move_button.set_name("smart mode button");
+ } else { //smart active but object inactive
+ smart_mode_button.set_active(0);
+ smart_mode_button.set_name("smart mode button");
+ mouse_move_button.set_name("mouse mode button");
+ }
+ } else {
+ smart_mode_button.set_active(0);
+ smart_mode_button.set_name("mouse mode button");
+ mouse_move_button.set_name("mouse mode button");
+ }
+*/
+