2 Copyright (C) 2000 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <sigc++/retype.h>
25 #include <libgnomecanvas/libgnomecanvas.h>
26 #include <gtkmm2ext/gtk_ui.h>
28 #include <ardour/location.h>
32 #include "selection.h"
34 #include "gui_thread.h"
35 #include "simplerect.h"
43 using namespace ARDOUR;
48 Editor::clear_marker_display ()
50 for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
54 location_markers.clear ();
58 Editor::add_new_location (Location *location)
60 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::add_new_location), location));
62 LocationMarkers *lam = new LocationMarkers;
65 if (location->is_cd_marker()) {
66 color = location_cd_marker_color;
67 } else if (location->is_mark()) {
68 color = location_marker_color;
69 } else if (location->is_auto_loop()) {
70 color = location_loop_color;
71 } else if (location->is_auto_punch()) {
72 color = location_punch_color;
74 color = location_range_color;
77 if (location->is_mark()) {
78 lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
81 } else if (location->is_auto_loop()) {
83 lam->start = new Marker (*this, *transport_marker_group, color,
84 location->name(), Marker::LoopStart, location->start());
85 lam->end = new Marker (*this, *transport_marker_group, color,
86 location->name(), Marker::LoopEnd, location->end());
88 } else if (location->is_auto_punch()) {
90 lam->start = new Marker (*this, *transport_marker_group, color,
91 location->name(), Marker::PunchIn, location->start());
92 lam->end = new Marker (*this, *transport_marker_group, color,
93 location->name(), Marker::PunchOut, location->end());
98 lam->start = new Marker (*this, *range_marker_group, color,
99 location->name(), Marker::Start, location->start());
100 lam->end = new Marker (*this, *range_marker_group, color,
101 location->name(), Marker::End, location->end());
104 if (location->is_hidden ()) {
110 location->start_changed.connect (mem_fun(*this, &Editor::location_changed));
111 location->end_changed.connect (mem_fun(*this, &Editor::location_changed));
112 location->changed.connect (mem_fun(*this, &Editor::location_changed));
113 location->name_changed.connect (mem_fun(*this, &Editor::location_changed));
114 location->FlagsChanged.connect (mem_fun(*this, &Editor::location_flags_changed));
116 pair<Location*,LocationMarkers*> newpair;
118 newpair.first = location;
119 newpair.second = lam;
121 location_markers.insert (newpair);
125 Editor::location_changed (Location *location)
127 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::location_changed), location));
129 LocationMarkers *lam = find_location_markers (location);
132 /* a location that isn't "marked" with markers */
136 lam->set_name (location->name());
137 lam->set_position (location->start(), location->end());
139 if (location->is_auto_loop()) {
140 update_loop_range_view ();
141 } else if (location->is_auto_punch()) {
142 update_punch_range_view ();
147 Editor::location_flags_changed (Location *location, void *src)
149 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src));
151 LocationMarkers *lam = find_location_markers (location);
154 /* a location that isn't "marked" with markers */
158 if (location->is_cd_marker()) {
159 lam->set_color_rgba (location_cd_marker_color);
160 } else if (location->is_mark()) {
161 lam->set_color_rgba (location_marker_color);
162 } else if (location->is_auto_punch()) {
163 lam->set_color_rgba (location_punch_color);
164 } else if (location->is_auto_loop()) {
165 lam->set_color_rgba (location_loop_color);
167 lam->set_color_rgba (location_range_color);
170 if (location->is_hidden()) {
177 Editor::LocationMarkers::~LocationMarkers ()
188 Editor::LocationMarkers *
189 Editor::find_location_markers (Location *location)
191 LocationMarkerMap::iterator i;
193 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
194 if ((*i).first == location) {
203 Editor::find_location_from_marker (Marker *marker, bool& is_start)
205 LocationMarkerMap::iterator i;
207 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
208 LocationMarkers *lm = (*i).second;
209 if (lm->start == marker) {
212 } else if (lm->end == marker) {
222 Editor::refresh_location_display_internal (Locations::LocationList& locations)
224 clear_marker_display ();
226 for (Locations::LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
227 add_new_location (*i);
232 Editor::refresh_location_display ()
234 ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display));
237 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
242 Editor::refresh_location_display_s (Change ignored)
244 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::refresh_location_display_s), ignored));
247 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
252 Editor::LocationMarkers::hide()
255 if (end) { end->hide(); }
259 Editor::LocationMarkers::show()
262 if (end) { end->show(); }
266 Editor::LocationMarkers::set_name (const string& str)
268 start->set_name (str);
269 if (end) { end->set_name (str); }
273 Editor::LocationMarkers::set_position (jack_nframes_t startf,
276 start->set_position (startf);
277 if (end) { end->set_position (endf); }
281 Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
283 start->set_color_rgba (rgba);
284 if (end) { end->set_color_rgba (rgba); }
288 Editor::mouse_add_new_marker (jack_nframes_t where)
291 Location *location = new Location (where, where, "mark", Location::IsMark);
292 session->begin_reversible_command (_("add marker"));
293 session->add_undo (session->locations()->get_memento());
294 session->locations()->add (location, true);
295 session->add_redo_no_execute (session->locations()->get_memento());
296 session->commit_reversible_command ();
301 Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event)
306 if ((marker = static_cast<Marker*> (item.get_data ("marker"))) == 0) {
307 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
311 Location* loc = find_location_from_marker (marker, is_start);
313 if (session && loc) {
315 /* you can't hide or delete this marker */
318 if (loc->is_auto_loop() || loc->is_auto_punch()) {
320 loc->set_hidden (true, this);
323 Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc));
329 Editor::really_remove_marker (Location* loc)
331 session->begin_reversible_command (_("remove marker"));
332 session->add_undo (session->locations()->get_memento());
333 session->locations()->remove (loc);
334 session->add_redo_no_execute (session->locations()->get_memento());
335 session->commit_reversible_command ();
340 Editor::location_gone (Location *location)
342 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location));
344 LocationMarkerMap::iterator i;
346 if (location == transport_loop_location()) {
347 update_loop_range_view (true);
350 if (location == transport_punch_location()) {
351 update_punch_range_view (true);
354 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
355 if ((*i).first == location) {
357 location_markers.erase (i);
364 Editor::tm_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
366 if (tm_marker_menu == 0) {
367 build_tm_marker_menu ();
370 marker_menu_item = item;
371 tm_marker_menu->popup (1, ev->time);
376 Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
379 if ((marker = reinterpret_cast<Marker *> (item->get_data("marker"))) == 0) {
380 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
385 Location * loc = find_location_from_marker (marker, is_start);
386 if (loc == transport_loop_location() || loc == transport_punch_location()) {
387 if (transport_marker_menu == 0) {
388 build_transport_marker_menu ();
390 marker_menu_item = item;
391 transport_marker_menu->popup (1, ev->time);
394 if (loc->is_mark()) {
395 if (marker_menu == 0) {
396 build_marker_menu ();
400 // GTK2FIX use action group sensitivity
402 if (children.size() >= 3) {
403 MenuItem * loopitem = &children[2];
405 if (loc->is_mark()) {
406 loopitem->set_sensitive(false);
409 loopitem->set_sensitive(true);
414 marker_menu_item = item;
415 marker_menu->popup (1, ev->time);
418 if (loc->is_range_marker()) {
419 if (range_marker_menu == 0){
420 build_range_marker_menu ();
422 marker_menu_item = item;
423 range_marker_menu->popup (1, ev->time);
429 Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
431 if (new_transport_marker_menu == 0) {
432 build_new_transport_marker_menu ();
435 new_transport_marker_menu->popup (1, ev->time);
440 Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
442 if (transport_marker_menu == 0) {
443 build_transport_marker_menu ();
446 transport_marker_menu->popup (1, ev->time);
450 Editor::build_marker_menu ()
452 using namespace Menu_Helpers;
454 marker_menu = new Menu;
455 MenuList& items = marker_menu->items();
456 marker_menu->set_name ("ArdourContextMenu");
458 items.push_back (MenuElem (_("Locate to Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
459 items.push_back (MenuElem (_("Play from Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
460 items.push_back (MenuElem (_("Set Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
462 items.push_back (SeparatorElem());
464 items.push_back (MenuElem (_("Rename Mark"), mem_fun(*this, &Editor::marker_menu_rename)));
465 items.push_back (MenuElem (_("Hide Mark"), mem_fun(*this, &Editor::marker_menu_hide)));
466 items.push_back (MenuElem (_("Remove Mark"), mem_fun(*this, &Editor::marker_menu_remove)));
471 Editor::build_range_marker_menu ()
473 using namespace Menu_Helpers;
475 range_marker_menu = new Menu;
476 MenuList& items = range_marker_menu->items();
477 range_marker_menu->set_name ("ArdourContextMenu");
479 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
480 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
481 items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
482 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
483 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
485 items.push_back (SeparatorElem());
487 items.push_back (MenuElem (_("Rename Range"), mem_fun(*this, &Editor::marker_menu_rename)));
488 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
489 items.push_back (MenuElem (_("Remove Range"), mem_fun(*this, &Editor::marker_menu_remove)));
491 items.push_back (SeparatorElem());
493 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
494 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
499 Editor::build_tm_marker_menu ()
501 using namespace Menu_Helpers;
503 tm_marker_menu = new Menu;
504 MenuList& items = tm_marker_menu->items();
505 tm_marker_menu->set_name ("ArdourContextMenu");
507 items.push_back (MenuElem (_("Edit"), mem_fun(*this, &Editor::marker_menu_edit)));
508 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove)));
512 Editor::build_new_transport_marker_menu ()
514 using namespace Menu_Helpers;
516 new_transport_marker_menu = new Menu;
517 MenuList& items = new_transport_marker_menu->items();
518 new_transport_marker_menu->set_name ("ArdourContextMenu");
520 items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
521 items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
523 new_transport_marker_menu->signal_unmap_event().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
527 Editor::build_transport_marker_menu ()
529 using namespace Menu_Helpers;
531 transport_marker_menu = new Menu;
532 MenuList& items = transport_marker_menu->items();
533 transport_marker_menu->set_name ("ArdourContextMenu");
535 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
536 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
537 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
538 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
539 items.push_back (SeparatorElem());
540 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
541 items.push_back (SeparatorElem());
542 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
543 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
547 Editor::marker_menu_hide ()
551 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
552 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
559 if ((l = find_location_from_marker (marker, is_start)) != 0) {
560 l->set_hidden (true, this);
565 Editor::marker_menu_select_all_selectables_using_range ()
569 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
570 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
577 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
578 select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, Selection::Set);
584 Editor::marker_menu_separate_regions_using_location ()
588 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
589 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
596 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
597 separate_regions_using_location (*l);
603 Editor::marker_menu_play_from ()
607 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
608 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
615 if ((l = find_location_from_marker (marker, is_start)) != 0) {
618 session->request_locate (l->start(), true);
621 //session->request_bounded_roll (l->start(), l->end());
624 session->request_locate (l->start(), true);
626 session->request_locate (l->end(), true);
633 Editor::marker_menu_set_playhead ()
637 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
638 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
645 if ((l = find_location_from_marker (marker, is_start)) != 0) {
648 session->request_locate (l->start(), false);
652 session->request_locate (l->start(), false);
654 session->request_locate (l->end(), false);
661 Editor::marker_menu_set_from_playhead ()
665 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
666 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
673 if ((l = find_location_from_marker (marker, is_start)) != 0) {
676 l->set_start (session->transport_frame ());
680 l->set_start (session->transport_frame ());
682 l->set_end (session->transport_frame ());
689 Editor::marker_menu_set_from_selection ()
693 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
694 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
701 if ((l = find_location_from_marker (marker, is_start)) != 0) {
708 /* if range selection use first to last */
710 if (mouse_mode == Editing::MouseRange) {
711 if (!selection->time.empty()) {
712 l->set_start (selection->time.start());
713 l->set_end (selection->time.end_frame());
717 if (!selection->audio_regions.empty()) {
718 l->set_start (selection->audio_regions.start());
719 l->set_end (selection->audio_regions.end_frame());
727 Editor::marker_menu_loop_range ()
731 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
732 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
739 if ((l = find_location_from_marker (marker, is_start)) != 0) {
741 if ((l2 = transport_loop_location()) != 0) {
742 l2->set (l->start(), l->end());
744 // enable looping, reposition and start rolling
745 session->request_auto_loop(true);
746 session->request_locate (l2->start(), true);
752 Editor::marker_menu_edit ()
758 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
759 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
763 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
764 edit_meter_section (&mm->meter());
765 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
766 edit_tempo_section (&tm->tempo());
768 fatal << X_("programming erorr: unhandled marker type in Editor::marker_menu_edit")
775 Editor::marker_menu_remove ()
781 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
782 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
786 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
787 remove_meter_marker (marker_menu_item);
788 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
789 remove_tempo_marker (marker_menu_item);
791 remove_marker (*marker_menu_item, (GdkEvent*) 0);
796 Editor::marker_menu_rename ()
800 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
801 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
808 loc = find_location_from_marker (marker, is_start);
812 ArdourPrompter dialog (true);
815 dialog.set_prompt (_("New Name:"));
817 if (loc->is_mark()) {
818 dialog.set_title (_("ardour: rename mark"));
820 dialog.set_title (_("ardour: rename range"));
823 dialog.set_name ("MarkRenameWindow");
824 dialog.set_size_request (250, -1);
825 dialog.set_position (Gtk::WIN_POS_MOUSE);
827 dialog.add_button (_("Rename"), RESPONSE_ACCEPT);
828 dialog.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
829 dialog.set_initial_text (loc->name());
833 switch (dialog.run ()) {
834 case RESPONSE_ACCEPT:
840 begin_reversible_command ( _("rename marker") );
841 session->add_undo( session->locations()->get_memento() );
843 dialog.get_result(txt);
846 session->add_redo_no_execute( session->locations()->get_memento() );
847 commit_reversible_command ();
851 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
854 transport_bar_drag_rect->hide();
855 range_marker_drag_rect->hide();
861 Editor::new_transport_marker_menu_set_loop ()
863 if (!session) return;
865 begin_reversible_command (_("set loop range"));
869 if ((tll = transport_loop_location()) == 0) {
870 Location* loc = new Location (temp_location->start(), temp_location->end(), _("Loop"), Location::IsAutoLoop);
871 session->add_undo (session->locations()->get_memento());
872 session->locations()->add (loc, true);
873 session->set_auto_loop_location (loc);
874 session->add_redo_no_execute (session->locations()->get_memento());
877 session->add_undo (retype_return<void>(bind (mem_fun (*tll, &Location::set), tll->start(), tll->end())));
878 session->add_redo (retype_return<void>(bind (mem_fun (*tll, &Location::set), temp_location->start(), temp_location->end())));
879 tll->set_hidden (false, this);
880 tll->set (temp_location->start(), temp_location->end());
883 commit_reversible_command ();
887 Editor::new_transport_marker_menu_set_punch ()
889 if (!session) return;
891 begin_reversible_command (_("set punch range"));
895 if ((tpl = transport_punch_location()) == 0) {
896 tpl = new Location (temp_location->start(), temp_location->end(), _("Punch"), Location::IsAutoPunch);
897 session->add_undo (session->locations()->get_memento());
898 session->locations()->add (tpl, true);
899 session->set_auto_punch_location (tpl);
900 session->add_redo_no_execute (session->locations()->get_memento());
902 session->add_undo (retype_return<void>(bind (mem_fun (*tpl, &Location::set), tpl->start(), tpl->end())));
903 session->add_redo (retype_return<void>(bind (mem_fun (*tpl, &Location::set), temp_location->start(), temp_location->end())));
904 tpl->set_hidden(false, this);
905 tpl->set(temp_location->start(), temp_location->end());
908 commit_reversible_command ();
912 Editor::update_loop_range_view (bool visibility)
920 if (session->get_auto_loop() && ((tll = transport_loop_location()) != 0)) {
922 double x1 = frame_to_pixel (tll->start());
923 double x2 = frame_to_pixel (tll->end());
925 transport_loop_range_rect->property_x1() = x1;
926 transport_loop_range_rect->property_x2() = x2;
929 transport_loop_range_rect->show();
932 else if (visibility) {
933 transport_loop_range_rect->hide();
938 Editor::update_punch_range_view (bool visibility)
946 if ((session->get_punch_in() || session->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
948 double x1 = frame_to_pixel (tpl->start());
949 double x2 = frame_to_pixel (tpl->end());
951 transport_punch_range_rect->property_x1() = x1;
952 transport_punch_range_rect->property_x2() = x2;
955 transport_punch_range_rect->show();
958 else if (visibility) {
959 transport_punch_range_rect->hide();
962 // if (session->get_punch_in()) {
963 // double x = frame_to_pixel (transport_punch_location->start());
964 // gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
967 // gnome_canvas_item_show (transport_punchin_line);
970 // else if (visibility) {
971 // gnome_canvas_item_hide (transport_punchin_line);
974 // if (session->get_punch_out()) {
975 // double x = frame_to_pixel (transport_punch_location->end());
977 // gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
980 // gnome_canvas_item_show (transport_punchout_line);
983 // else if (visibility) {
984 // gnome_canvas_item_hide (transport_punchout_line);