mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
use a separate drag rect for cd marker bar, show cd marker details on load in location ui.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3012 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8cddcec46f
commit
8f77a84552
4 changed files with 30 additions and 5 deletions
|
|
@ -1550,6 +1550,7 @@ public:
|
|||
void drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
|
||||
void end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
|
||||
|
||||
ArdourCanvas::SimpleRect* cd_marker_bar_drag_rect;
|
||||
ArdourCanvas::SimpleRect* range_bar_drag_rect;
|
||||
ArdourCanvas::SimpleRect* transport_bar_drag_rect;
|
||||
ArdourCanvas::Line* marker_drag_line;
|
||||
|
|
|
|||
|
|
@ -184,6 +184,10 @@ Editor::initialize_canvas ()
|
|||
transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
|
||||
transport_marker_bar->property_outline_pixels() = 0;
|
||||
|
||||
cd_marker_bar_drag_rect = new ArdourCanvas::SimpleRect (*cd_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
|
||||
cd_marker_bar_drag_rect->property_outline_pixels() = 0;
|
||||
cd_marker_bar_drag_rect->hide ();
|
||||
|
||||
range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
|
||||
range_bar_drag_rect->property_outline_pixels() = 0;
|
||||
range_bar_drag_rect->hide ();
|
||||
|
|
@ -773,6 +777,9 @@ Editor::color_handler()
|
|||
transport_marker_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TransportMarkerBar.get();
|
||||
transport_marker_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();
|
||||
|
||||
cd_marker_bar_drag_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
cd_marker_bar_drag_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
|
||||
range_bar_drag_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
range_bar_drag_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_RangeDragBarRect.get();
|
||||
|
||||
|
|
|
|||
|
|
@ -4746,7 +4746,23 @@ Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
{
|
||||
nframes_t start = 0;
|
||||
nframes_t end = 0;
|
||||
ArdourCanvas::SimpleRect *crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
|
||||
ArdourCanvas::SimpleRect *crect;
|
||||
|
||||
switch (range_marker_op) {
|
||||
case CreateRangeMarker:
|
||||
crect = range_bar_drag_rect;
|
||||
break;
|
||||
case CreateTransportMarker:
|
||||
crect = transport_bar_drag_rect;
|
||||
break;
|
||||
case CreateCDMarker:
|
||||
crect = cd_marker_bar_drag_rect;
|
||||
break;
|
||||
default:
|
||||
cerr << "Error: unknown range marker op passed to Editor::drag_range_markerbar_op ()" << endl;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (drag_info.current_pointer_frame);
|
||||
|
|
@ -4833,9 +4849,11 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
session->locations()->next_available_name(rangename,"unnamed");
|
||||
if (range_marker_op == CreateCDMarker) {
|
||||
flags = Location::IsRangeMarker|Location::IsCDMarker;
|
||||
cd_marker_bar_drag_rect->hide();
|
||||
}
|
||||
else {
|
||||
flags = Location::IsRangeMarker;
|
||||
range_bar_drag_rect->hide();
|
||||
}
|
||||
newloc = new Location(temp_location->start(), temp_location->end(), rangename, (Location::Flags) flags);
|
||||
session->locations()->add (newloc, true);
|
||||
|
|
@ -4843,7 +4861,6 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
session->add_command(new MementoCommand<Locations>(*(session->locations()), &before, &after));
|
||||
commit_reversible_command ();
|
||||
|
||||
range_bar_drag_rect->hide();
|
||||
range_marker_drag_rect->hide();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -421,9 +421,9 @@ LocationEditRow::cd_toggled ()
|
|||
return;
|
||||
}
|
||||
|
||||
if (cd_check_button.get_active() == location->is_cd_marker()) {
|
||||
return;
|
||||
}
|
||||
//if (cd_check_button.get_active() == location->is_cd_marker()) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (cd_check_button.get_active()) {
|
||||
if (location->start() <= session->current_start_frame()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue