- /* this happens as the second step of a DnD within the treeview as well
- as when a row/route is actually deleted.
- */
+ if (_no_redisplay || !_session || _session->deletion_in_progress()) {
+ return;
+ }
+
+ // model deprecated g_atomic_int_exchange_and_add(, 1)
+ g_atomic_int_inc(&_redisplay_active);
+ if (!g_atomic_int_compare_and_exchange (&_redisplay_active, 1, 1)) {
+ return;
+ }
+
+ redisplay_real ();
+
+ while (!g_atomic_int_compare_and_exchange (&_redisplay_active, 1, 0)) {
+ g_atomic_int_set(&_redisplay_active, 1);
+ redisplay_real ();
+ }
+}
+
+void
+EditorRoutes::row_deleted (Gtk::TreeModel::Path const &)
+{
+ /* this happens as the second step of a DnD within the treeview, and
+ * when a route is actually removed. we don't differentiate between
+ * the two cases.
+ *
+ * note that the sync_orders_keys() step may not actually change any
+ * RID's (e.g. the last track may be removed, so all other tracks keep
+ * the same RID), which means that no redisplay would happen. so we
+ * have to force a redisplay.
+ */
+