resolve merge with master (?)
[ardour.git] / gtk2_ardour / editor_markers.cc
index 6dee565287967b0912cbe4ac7bc4237e34bb0993..859f5831b05d3d9408705950ba49fbdec341cec1 100644 (file)
@@ -1338,12 +1338,23 @@ Editor::marker_menu_rename ()
                /*NOTREACHED*/
        }
 
+
+       rename_marker (marker);
+}
+
+void
+Editor::rename_marker(Marker *marker)
+{
        Location* loc;
        bool is_start;
 
        loc = find_location_from_marker (marker, is_start);
 
-       if (!loc) return;
+       if (!loc)
+              return;
+
+       if (loc == transport_loop_location() || loc == transport_punch_location() || loc->is_session_range())
+               return;
 
        ArdourPrompter dialog (true);
        string txt;
@@ -1378,6 +1389,7 @@ Editor::marker_menu_rename ()
 
        dialog.get_result(txt);
        loc->set_name (txt);
+       _session->set_dirty ();
 
        XMLNode &after = _session->locations()->get_state();
        _session->add_command (new MementoCommand<Locations>(*(_session->locations()), &before, &after));