#include "canvas/canvas.h"
#include "actions.h"
-#include "ardour_ui.h"
#include "audio_region_view.h"
#include "audio_streamview.h"
#include "audio_time_axis.h"
#include "time_axis_view.h"
#include "transpose_dialog.h"
#include "transform_dialog.h"
+#include "ui_config.h"
#include "i18n.h"
if (_drags->active ()) {
_drags->abort ();
}
-
+
if (_session) {
_session->undo (n);
if (_session->undo_depth() == 0) {
if (_drags->active ()) {
_drags->abort ();
}
-
+
if (_session) {
_session->redo (n);
if (_session->redo_depth() == 0) {
for (list<RouteTimeAxisView*>::iterator i = used_trackviews.begin(); i != used_trackviews.end(); ++i) {
region_added_connections.push_back ((*i)->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view)));
}
-
+
while (used_playlists.size() > 0) {
list <boost::shared_ptr<Playlist > >::iterator i = used_playlists.begin();
(*i)->thaw();
if (in_command) {
commit_reversible_command ();
}
- }
-}
+ }
+}
/* DISPLAY MOTION */
TimeAxisView *ontrack = 0;
TrackViewList tlist;
-
+
if (!selection->tracks.empty()) {
tlist = selection->tracks.filter_to_unique_playlists ();
} else {
}
/* move to the track below the first one that covers the */
-
+
if (next != track_views.rend()) {
ensure_time_axis_view_is_visible (**next, true);
return true;
}
return false;
-}
+}
bool
Editor::scroll_up_one_track (bool skip_child_views)
{
TrackViewList::iterator prev = track_views.end();
double top_of_trackviews = vertical_adjustment.get_value ();
-
+
for (TrackViewList::iterator t = track_views.begin(); t != track_views.end(); ++t) {
if ((*t)->hidden()) {
continue;
}
- /* find the trackview at the top of the trackview group
+ /* find the trackview at the top of the trackview group
*
* Note that covers_y_position() is recursive and includes child views
*/
std::pair<TimeAxisView*,double> res = (*t)->covers_y_position (top_of_trackviews);
-
+
if (res.first) {
if (skip_child_views) {
break;
/* automation lane (one level, non-recursive)
*
* - if no automation lane exists -> move to prev tack
- * - if no y-axis match is found -> the current track is at the top -> move to prev track
+ * - if no y-axis match is found -> the current track is at the top -> move to prev track
* (actually last automation lane of previous track, see below)
* - if first (top-most) lane is at the top -> move to this track
* - else move up one lane
prev = t;
}
-
+
if (prev != track_views.end()) {
// move to bottom-most automation-lane of the previous track
TimeAxisView::Children kids = (*prev)->get_child_list();
} else {
ts = &selection->tracks;
}
-
+
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
tv->step_height (coarser);
} else {
ts = &selection->tracks;
}
-
+
for (TrackViewList::iterator i = ts->begin(); i != ts->end(); ++i) {
TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
uint32_t h = tv->current_height ();
return;
}
- // Imposing an arbitrary limit to zoom out as too much zoom out produces
+ // Imposing an arbitrary limit to zoom out as too much zoom out produces
// segfaults for lack of memory. If somebody decides this is not high enough I
// believe it can be raisen to higher values but some limit must be in place.
//
if ( !get_selection_extents(start, end) )
return;
-
+
calc_extra_zoom_edges (start, end);
/* if we're zooming on both axes we need to save track heights etc.
PBD::Unwinder<bool> nsv (no_save_visual, true);
temporal_zoom_by_frame (start, end);
-
+
if (both_axes) {
uint32_t per_track_height = (uint32_t) floor ((_visible_canvas_height - 10.0) / tracks.size());
start = max_framepos;
end = 0;
bool ret = true;
-
+
//ToDo: if notes are selected, set extents to that selection
//ToDo: if control points are selected, set extents to that selection
} else if (!selection->time.empty()) {
start = selection->time.start();
end = selection->time.end_frame();
- } else
+ } else
ret = false; //no selection found
//range check
if ((start == 0 && end == 0) || end < start) {
ret = false;
}
-
- return ret;
+
+ return ret;
}
calc_extra_zoom_edges(start, end);
temporal_zoom_by_frame (start, end);
}
-
+
if (both_axes)
fit_selection();
}
framepos_t range = end - start;
const framecnt_t new_fpp = (framecnt_t) ceil ((double) range / (double) _visible_canvas_width);
-
+
framepos_t new_page = range;
framepos_t middle = (framepos_t) floor ((double) start + ((double) range / 2.0f));
framepos_t new_leftmost = (framepos_t) floor ((double) middle - ((double) new_page / 2.0f));
/* zoom focus is automatically taken as @param frame when this
method is used.
*/
-
+
framepos_t new_leftmost = frame - (framepos_t)range_before;
if (new_leftmost > frame) {
bool
Editor::choose_new_marker_name(string &name) {
- if (!ARDOUR_UI::config()->get_name_new_markers()) {
+ if (!UIConfiguration::instance().get_name_new_markers()) {
/* don't prompt user for a new name */
return true;
}
Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
begin_reversible_command (_("add marker"));
-
+
XMLNode &before = _session->locations()->get_state();
_session->locations()->add (location, true);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-
+
commit_reversible_command ();
}
}
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
begin_reversible_command (_("add marker"));
-
+
XMLNode &before = _session->locations()->get_state();
_session->locations()->add (location, true);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-
+
commit_reversible_command ();
}
{
if (!_session)
return;
-
+
Location* loc;
if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen
_session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
XMLNode &after = loc->get_state();
begin_reversible_command (_("Set session start"));
-
+
_session->add_command (new MementoCommand<Location>(*loc, &before, &after));
commit_reversible_command ();
{
if (!_session)
return;
-
+
Location* loc;
if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen
_session->set_session_extents ( _session->audible_frame(), _session->audible_frame() );
removed = true;
}
}
-
+
//store undo
if (removed) {
begin_reversible_command (_("remove marker"));
return;
}
bool commit = false;
-
+
XMLNode &before = _session->locations()->get_state();
for (RegionSelection::iterator i = rs.begin (); i != rs.end (); ++i) {
if (pos < 0) {
return;
}
-
+
_session->request_locate (pos, _session->transport_rolling());
}
{
if (_session) {
begin_reversible_command (_("clear markers"));
-
+
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear_markers ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-
+
commit_reversible_command ();
}
}
{
if (_session) {
begin_reversible_command (_("clear ranges"));
-
+
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear_ranges ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-
+
commit_reversible_command ();
}
}
Editor::clear_locations ()
{
begin_reversible_command (_("clear locations"));
-
+
XMLNode &before = _session->locations()->get_state();
_session->locations()->clear ();
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
-
+
commit_reversible_command ();
}
void
Editor::maybe_locate_with_edit_preroll ( framepos_t location )
{
- if ( _session->transport_rolling() || !ARDOUR_UI::config()->get_follow_edits() || _ignore_follow_edits )
+ if ( _session->transport_rolling() || !UIConfiguration::instance().get_follow_edits() || _ignore_follow_edits )
return;
location -= get_preroll();
-
+
//don't try to locate before the beginning of time
- if ( location < 0 )
+ if ( location < 0 )
location = 0;
-
+
//if follow_playhead is on, keep the playhead on the screen
if ( _follow_playhead )
- if ( location < leftmost_frame )
+ if ( location < leftmost_frame )
location = leftmost_frame;
_session->request_locate( location );
{
{
framepos_t preroll = get_preroll();
-
+
framepos_t start, end;
if (!get_selection_extents ( start, end))
return;
if (start > preroll)
start = start - preroll;
-
+
end = end + preroll; //"post-roll"
-
+
AudioRange ar (start, end, 0);
list<AudioRange> lar;
lar.push_back (ar);
begin_reversible_command (_("raise region to top"));
}
break;
-
+
case Lower:
if (multiple) {
begin_reversible_command (_("lower regions"));
begin_reversible_command (_("lower region"));
}
break;
-
+
case LowerToBottom:
if (multiple) {
begin_reversible_command (_("lower regions to bottom"));
for (set<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
(*i)->clear_owned_changes ();
}
-
+
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
boost::shared_ptr<Region> r = (*i)->region ();
switch (op) {
(*i)->rdiff (cmds);
_session->add_commands (cmds);
}
-
+
commit_reversible_command ();
}
}
}
-void
-Editor::audition_playlist_region_via_route (boost::shared_ptr<Region> region, Route& route)
-{
- if (_session->is_auditioning()) {
- _session->cancel_audition ();
- }
-
- // note: some potential for creativity here, because region doesn't
- // have to belong to the playlist that Route is handling
-
- // bool was_soloed = route.soloed();
-
- route.set_solo (true, this);
-
- _session->request_bounded_roll (region->position(), region->position() + region->length());
-
- /* XXX how to unset the solo state ? */
-}
-
/** Start an audition of the first selected region */
void
Editor::play_edit_range ()
/* stop transport before we start. this is important */
_session->request_transport_speed (0.0);
-
+
/* wait for just a little while, because the above call is asynchronous */
Glib::usleep (250000);
if (!selection->regions.empty()) {
cut_copy_regions (op, selection->regions);
-
+
if (op == Cut || op == Delete) {
selection->clear_regions ();
}
}
-
+
if (!selection->points.empty()) {
cut_copy_points (op);
-
+
if (op == Cut || op == Delete) {
selection->clear_points ();
}
did_edit = true;
cut_copy_ranges (op);
-
+
if (op == Cut || op == Delete) {
selection->clear_time ();
}
}
-
+
if (did_edit) {
/* reset repeated paste state */
paste_count = 0;
last_paste_pos = 0;
- commit_reversible_command ();
+ commit_reversible_command ();
}
-
+
if (op == Delete || op == Cut || op == Clear) {
_drags->abort ();
}
struct AutomationRecord {
AutomationRecord () : state (0) , line(NULL) {}
AutomationRecord (XMLNode* s, const AutomationLine* l) : state (s) , line (l) {}
-
+
XMLNode* state; ///< state before any operation
const AutomationLine* line; ///< line this came from
boost::shared_ptr<Evoral::ControlList> copy; ///< copied events for the cut buffer
cut_buffer->add (i->second.copy);
}
}
-
+
if (op == Delete || op == Cut) {
/* This operation needs to remove things from the main AutomationList, so do that now */
-
+
for (Lists::iterator i = lists.begin(); i != lists.end(); ++i) {
i->first->freeze ();
}
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
-
+
_session->add_command(new StatefulDiffCommand (playlist));
commit_reversible_command ();
}
vector<Command*> cmds;
(*pl)->rdiff (cmds);
_session->add_commands (cmds);
-
+
_session->add_command(new StatefulDiffCommand (*pl));
}
if (op != Delete) {
vector<PlaylistMapping>::iterator z;
-
+
for (z = pmap.begin(); z != pmap.end(); ++z) {
if ((*z).tv == &tv) {
break;
}
}
-
+
assert (z != pmap.end());
-
+
if (!(*z).pl) {
npl = PlaylistFactory::create (pl->data_type(), *_session, "cutlist", true);
npl->freeze();
if (Config->get_edit_mode() == Ripple)
pl->ripple (r->position(), -r->length(), boost::shared_ptr<Region>());
break;
-
+
case Cut:
_xx = RegionFactory::create (r);
npl->add_region (_xx, r->position() - first_position);
if (op != Delete) {
list<boost::shared_ptr<Playlist> > foo;
-
+
/* the pmap is in the same order as the tracks in which selected regions occured */
-
+
for (vector<PlaylistMapping>::iterator i = pmap.begin(); i != pmap.end(); ++i) {
if ((*i).pl) {
(*i).pl->thaw();
foo.push_back ((*i).pl);
}
}
-
+
if (!foo.empty()) {
cut_buffer->set (foo);
}
-
+
if (pmap.empty()) {
_last_cut_copy_source_track = 0;
} else {
vector<Command*> cmds;
(*pl)->rdiff (cmds);
_session->add_commands (cmds);
-
+
_session->add_command (new StatefulDiffCommand (*pl));
}
}
return;
}
ts.push_back (entered_track);
- }
+ }
for (TrackViewList::iterator i = ts.begin(); i != ts.end(); ++i) {
(*i)->cut_copy_clear (*selection, op);
framepos_t const start_frame = regions.start ();
framepos_t const end_frame = regions.end_frame ();
+ framecnt_t const gap = end_frame - start_frame;
begin_reversible_command (Operations::duplicate_region);
latest_regionviews.clear ();
sigc::connection c = rtv->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view));
+ framepos_t const position = end_frame + (r->first_frame() - start_frame);
playlist = (*i)->region()->playlist();
playlist->clear_changes ();
- playlist->duplicate (r, end_frame + (r->first_frame() - start_frame), times);
+ playlist->duplicate (r, position, gap, times);
_session->add_command(new StatefulDiffCommand (playlist));
c.disconnect ();
}
}
+ assert (!audio_only.empty());
+
StripSilenceDialog d (_session, audio_only);
int const r = d.run ();
vector<Command*> cmds;
playlist->rdiff (cmds);
_session->add_commands (cmds);
-
- _session->add_command(new StatefulDiffCommand (playlist));
- } else {
- continue;
+ _session->add_command(new StatefulDiffCommand (playlist));
}
if (progress) {
}
bool in_command = false;
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i);
if (arv) {
}
begin_reversible_command (_("toggle region lock"));
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_locked (!(*i)->region()->locked());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
-
+
commit_reversible_command ();
}
}
begin_reversible_command (_("Toggle Video Lock"));
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_video_locked (!(*i)->region()->video_locked());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
-
+
commit_reversible_command ();
}
}
begin_reversible_command (_("region lock style"));
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
PositionLockStyle const ns = (*i)->region()->position_lock_style() == AudioTime ? MusicTime : AudioTime;
(*i)->region()->set_position_lock_style (ns);
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
-
+
commit_reversible_command ();
}
}
begin_reversible_command (_("change region opacity"));
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ++i) {
(*i)->region()->clear_changes ();
(*i)->region()->set_opaque (!(*i)->region()->opaque());
_session->add_command (new StatefulDiffCommand ((*i)->region()));
}
-
+
commit_reversible_command ();
}
if (_ignore_region_action) {
return;
}
-
+
boost::shared_ptr<AudioRegion> ar;
bool yn = false;
}
}
- if (ARDOUR_UI::config()->get_follow_edits()) {
+ if (UIConfiguration::instance().get_follow_edits()) {
cancel_time_selection();
}
}
void
Editor::split_region ()
{
+ if (_drags->active ()) {
+ return;
+ }
+
//if a range is selected, separate it
if ( !selection->time.empty()) {
separate_regions_between (selection->time);
//if no range was selected, try to find some regions to split
if (current_mouse_mode() == MouseObject) { //don't try this for Internal Edit, Stretch, Draw, etc.
-
+
RegionSelection rs = get_regions_from_selection_and_edit_point ();
framepos_t where = get_preferred_edit_position ();
if (_session == 0) {
return;
}
-
+
framepos_t start, end;
if (!get_selection_extents ( start, end))
return;
}
}
+void
+Editor::set_punch_start_from_edit_point ()
+{
+ if (_session) {
+
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
+
+ //use the existing punch end, if any
+ Location* tpl = transport_punch_location();
+ if (tpl) {
+ end = tpl->end();
+ }
+
+ if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
+ start = _session->audible_frame();
+ } else {
+ start = get_preferred_edit_position();
+ }
+
+ //snap the selection start/end
+ snap_to(start);
+
+ //if there's not already a sensible selection endpoint, go "forever"
+ if ( start > end ) {
+ end = max_framepos;
+ }
+
+ set_punch_range (start, end, _("set punch start from EP"));
+ }
+
+}
+
+void
+Editor::set_punch_end_from_edit_point ()
+{
+ if (_session) {
+
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
+
+ //use the existing punch start, if any
+ Location* tpl = transport_punch_location();
+ if (tpl) {
+ start = tpl->start();
+ }
+
+ if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
+ end = _session->audible_frame();
+ } else {
+ end = get_preferred_edit_position();
+ }
+
+ //snap the selection start/end
+ snap_to(end);
+
+ set_punch_range (start, end, _("set punch end from EP"));
+
+ }
+}
+
+void
+Editor::set_loop_start_from_edit_point ()
+{
+ if (_session) {
+
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
+
+ //use the existing loop end, if any
+ Location* tpl = transport_loop_location();
+ if (tpl) {
+ end = tpl->end();
+ }
+
+ if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
+ start = _session->audible_frame();
+ } else {
+ start = get_preferred_edit_position();
+ }
+
+ //snap the selection start/end
+ snap_to(start);
+
+ //if there's not already a sensible selection endpoint, go "forever"
+ if ( start > end ) {
+ end = max_framepos;
+ }
+
+ set_loop_range (start, end, _("set loop start from EP"));
+ }
+
+}
+
+void
+Editor::set_loop_end_from_edit_point ()
+{
+ if (_session) {
+
+ framepos_t start = 0;
+ framepos_t end = max_framepos;
+
+ //use the existing loop start, if any
+ Location* tpl = transport_loop_location();
+ if (tpl) {
+ start = tpl->start();
+ }
+
+ if ((_edit_point == EditAtPlayhead) && _session->transport_rolling()) {
+ end = _session->audible_frame();
+ } else {
+ end = get_preferred_edit_position();
+ }
+
+ //snap the selection start/end
+ snap_to(end);
+
+ set_loop_range (start, end, _("set loop end from EP"));
+ }
+}
+
void
Editor::set_punch_from_region ()
{
}
begin_reversible_command (_("split regions"));
-
+
for (RegionSelection::iterator i = rs.begin(); i != rs.end(); ) {
RegionSelection::iterator tmp;
i = tmp;
}
-
+
commit_reversible_command ();
}
vector<Command*> cmds;
pl->rdiff (cmds);
_session->add_commands (cmds);
-
+
_session->add_command (new StatefulDiffCommand (pl));
if (select_new) {
framepos_t where = get_preferred_edit_position();
begin_reversible_command (_("place transient"));
-
+
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
framepos_t position = (*r)->region()->position();
(*r)->region()->add_transient(where - position);
}
-
+
commit_reversible_command ();
}
}
begin_reversible_command (_("snap regions to grid"));
-
+
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
boost::shared_ptr<Playlist> pl = (*r)->region()->playlist();
(*i)->thaw();
used_playlists.pop_front();
}
-
+
commit_reversible_command ();
}
/* Iterate over the region list and make adjacent regions overlap by crossfade_len_ms */
begin_reversible_command (_("close region gaps"));
-
+
int idx = 0;
boost::shared_ptr<Region> last_region;
(*i)->thaw();
used_playlists.pop_front();
}
-
+
commit_reversible_command ();
}
if (!_session) {
return;
}
-
+
framepos_t pos = playhead_cursor->current_frame ();
if (pos < max_framepos - 1) {
pos += 2;
if (!_session) {
return;
}
-
+
framepos_t pos = playhead_cursor->current_frame ();
if (pos > 2) {
pos -= 2;
trackstr = P_("track", "tracks", ntracks);
busstr = P_("bus", "busses", nbusses);
-
+
if (ntracks) {
if (nbusses) {
prompt = string_compose (_("Do you really want to remove %1 %2 and %3 %4?\n"
if (all_playlists) {
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
- if (rtav) {
+ if (rtav && rtav->track ()) {
vector<boost::shared_ptr<Playlist> > all = _session->playlists->playlists_for_track (rtav->track ());
for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) {
pl.insert (*p);
pl.insert ((*x)->playlist ());
}
}
-
+
for (set<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
(*i)->clear_changes ();
if (response != RESPONSE_OK) {
return;
}
-
+
framecnt_t distance = d.distance();
if (distance == 0) {
}
void
-Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
+Editor::remove_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
{
if (Config->get_edit_mode() == Lock) {
for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
/* regions */
boost::shared_ptr<Playlist> pl = (*x)->playlist();
-
+
if (pl) {
XMLNode &before = pl->get_state();
-
+
std::list<AudioRange> rl;
AudioRange ar(pos, pos+frames, 0);
rl.push_back(ar);
pl->cut (rl);
pl->shift (pos, -frames, true, ignore_music_glue);
-
+
if (!in_command) {
begin_reversible_command (_("cut time"));
in_command = true;
}
XMLNode &after = pl->get_state();
-
+
_session->add_command (new MementoCommand<Playlist> (*pl, &before, &after));
}
-
+
/* automation */
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav) {
}
std::list<Location*> loc_kill_list;
-
+
/* markers */
if (markers_too) {
bool moved = false;
for (list<Location*>::iterator i = loc_kill_list.begin(); i != loc_kill_list.end(); ++i) {
_session->locations()->remove( *i );
}
-
+
if (moved) {
if (!in_command) {
begin_reversible_command (_("cut time"));
_session->add_command (new MementoCommand<Locations>(*_session->locations(), &before, &after));
}
}
-
+
if (tempo_too) {
XMLNode& before (_session->tempo_map().get_state());
_session->add_command (new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));
}
}
-
+
if (in_command) {
commit_reversible_command ();
}
/* compute the per-track height from:
- total canvas visible height -
+ total canvas visible height -
height that will be taken by visible children of selected
- tracks - height of the ruler/hscroll area
+ tracks - height of the ruler/hscroll area
*/
uint32_t h = (uint32_t) floor ((trackviews_height() - child_heights) / visible_tracks);
double first_y_pos = DBL_MAX;
Editor::start_visual_state_op (uint32_t n)
{
save_visual_state (n);
-
+
PopUp* pup = new PopUp (WIN_POS_MOUSE, 1000, true);
char buf[32];
snprintf (buf, sizeof (buf), _("Saved view %u"), n+1);
onoff = !mt->input_active();
}
}
-
+
_session->set_exclusive_input_active (rl, onoff, flip_others);
}
b->set_text (_("Click to unlock"));
b->signal_clicked.connect (sigc::mem_fun (*this, &Editor::unlock));
lock_dialog->get_vbox()->pack_start (*b);
-
+
lock_dialog->get_vbox()->show_all ();
lock_dialog->set_size_request (200, 200);
}
delete _main_menu_disabler;
_main_menu_disabler = new MainMenuDisabler;
-
+
lock_dialog->present ();
}
Editor::unlock ()
{
lock_dialog->hide ();
-
+
delete _main_menu_disabler;
- if (ARDOUR_UI::config()->get_lock_gui_after_seconds()) {
+ if (UIConfiguration::instance().get_lock_gui_after_seconds()) {
start_lock_event_timing ();
}
}
ArdourDialog w (_("Moving embedded files into session folder"));
w.get_vbox()->pack_start (msg);
w.present ();
-
+
/* flush all pending GUI events because we're about to start copying
* files
*/
-
+
Gtkmm2ext::UI::instance()->flush_pending ();
cerr << " Do it\n";