summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-14 16:49:59 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-14 16:49:59 +0000
commit82e1d1267d091ac4a6f2cfa3e78ddcefe6592f8d (patch)
tree1f5885f4ce432aa414cf23e7d3cf034d52faf3c7 /gtk2_ardour/editor.cc
parent1a9bd134d22f281d33271e99dbac6a6acc13913b (diff)
Use the edit position to decide what items to put in the region context menus, rather than the mouse position.
git-svn-id: svn://localhost/ardour2/branches/3.0@8028 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 505a191323..82bb84097d 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1478,10 +1478,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
}
void
-Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, framepos_t frame)
+Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection)
{
using namespace Menu_Helpers;
- Menu* (Editor::*build_menu_function)(framepos_t);
+ Menu* (Editor::*build_menu_function)();
Menu *menu;
switch (item_type) {
@@ -1522,7 +1522,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
return;
}
- menu = (this->*build_menu_function)(frame);
+ menu = (this->*build_menu_function)();
menu->set_name ("ArdourContextMenu");
/* now handle specific situations */
@@ -1605,7 +1605,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
}
Menu*
-Editor::build_track_context_menu (framepos_t)
+Editor::build_track_context_menu ()
{
using namespace Menu_Helpers;
@@ -1617,7 +1617,7 @@ Editor::build_track_context_menu (framepos_t)
}
Menu*
-Editor::build_track_bus_context_menu (framepos_t)
+Editor::build_track_bus_context_menu ()
{
using namespace Menu_Helpers;
@@ -1629,7 +1629,7 @@ Editor::build_track_bus_context_menu (framepos_t)
}
Menu*
-Editor::build_track_region_context_menu (framepos_t frame)
+Editor::build_track_region_context_menu ()
{
using namespace Menu_Helpers;
MenuList& edit_items = track_region_context_menu.items();
@@ -1651,7 +1651,7 @@ Editor::build_track_region_context_menu (framepos_t frame)
mode and so offering region context is somewhat confusing.
*/
if ((tr = rtv->track()) && ((pl = tr->playlist())) && !internal_editing()) {
- framepos_t framepos = (framepos_t) floor ((double)frame * tr->speed());
+ framepos_t const framepos = (framepos_t) floor ((double) get_preferred_edit_position() * tr->speed());
uint32_t regions_at = pl->count_regions_at (framepos);
add_region_context_items (edit_items, regions_at > 1);
}
@@ -1663,7 +1663,7 @@ Editor::build_track_region_context_menu (framepos_t frame)
}
Menu*
-Editor::build_track_crossfade_context_menu (framepos_t frame)
+Editor::build_track_crossfade_context_menu ()
{
using namespace Menu_Helpers;
MenuList& edit_items = track_crossfade_context_menu.items();
@@ -1680,7 +1680,7 @@ Editor::build_track_crossfade_context_menu (framepos_t frame)
AudioPlaylist::Crossfades xfades;
- apl->crossfades_at (frame, xfades);
+ apl->crossfades_at (get_preferred_edit_position (), xfades);
bool many = xfades.size() > 1;
@@ -1688,7 +1688,7 @@ Editor::build_track_crossfade_context_menu (framepos_t frame)
add_crossfade_context_items (atv->audio_view(), (*i), edit_items, many);
}
- framepos_t framepos = (framepos_t) floor ((double)frame * tr->speed());
+ framepos_t framepos = (framepos_t) floor ((double) get_preferred_edit_position() * tr->speed());
uint32_t regions_at = pl->count_regions_at (framepos);
add_region_context_items (edit_items, regions_at > 1);
}
@@ -1736,7 +1736,7 @@ Editor::analyze_range_selection()
}
Menu*
-Editor::build_track_selection_context_menu (framepos_t)
+Editor::build_track_selection_context_menu ()
{
using namespace Menu_Helpers;
MenuList& edit_items = track_selection_context_menu.items();