code readability change I forgot to add before committing, and removal of debug output
git-svn-id: svn://localhost/ardour2/trunk@1839 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9383499ce6
commit
20cdab6416
|
@ -2655,13 +2655,13 @@ void
|
|||
ARDOUR_UI::update_transport_clocks (nframes_t pos)
|
||||
{
|
||||
if (Config->get_primary_clock_delta_edit_cursor()) {
|
||||
primary_clock.set (pos, false, editor->edit_cursor_position(false), 1);
|
||||
primary_clock.set (pos, false, editor->edit_cursor_position(false), 'p');
|
||||
} else {
|
||||
primary_clock.set (pos, 0, true);
|
||||
}
|
||||
|
||||
if (Config->get_secondary_clock_delta_edit_cursor()) {
|
||||
secondary_clock.set (pos, false, editor->edit_cursor_position(false), 2);
|
||||
secondary_clock.set (pos, false, editor->edit_cursor_position(false), 's');
|
||||
} else {
|
||||
secondary_clock.set (pos);
|
||||
}
|
||||
|
|
|
@ -271,8 +271,8 @@ ARDOUR_UI::setup_transport ()
|
|||
|
||||
/* clocks, etc. */
|
||||
|
||||
ARDOUR_UI::Clock.connect (bind (mem_fun (primary_clock, &AudioClock::set), 1));
|
||||
ARDOUR_UI::Clock.connect (bind (mem_fun (secondary_clock, &AudioClock::set), 2));
|
||||
ARDOUR_UI::Clock.connect (bind (mem_fun (primary_clock, &AudioClock::set), 'p'));
|
||||
ARDOUR_UI::Clock.connect (bind (mem_fun (secondary_clock, &AudioClock::set), 's'));
|
||||
|
||||
primary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::primary_clock_value_changed));
|
||||
secondary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::secondary_clock_value_changed));
|
||||
|
|
|
@ -385,7 +385,7 @@ AudioClock::on_realize ()
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set (nframes_t when, bool force, nframes_t offset, int which)
|
||||
AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
|
||||
{
|
||||
|
||||
if ((!force && !is_visible()) || session == 0) {
|
||||
|
@ -399,23 +399,22 @@ AudioClock::set (nframes_t when, bool force, nframes_t offset, int which)
|
|||
bool pdelta = Config->get_primary_clock_delta_edit_cursor();
|
||||
bool sdelta = Config->get_secondary_clock_delta_edit_cursor();
|
||||
|
||||
if (offset && which == 1 && pdelta) {
|
||||
if (offset && which == 'p' && pdelta) {
|
||||
when = (when > offset) ? when - offset : offset - when;
|
||||
} else if (offset && which == 2 && sdelta) {
|
||||
} else if (offset && which == 's' && sdelta) {
|
||||
when = (when > offset) ? when - offset : offset - when;
|
||||
}
|
||||
|
||||
if (which == 1 && pdelta && !last_pdelta) {
|
||||
cout << "set_widget_name() called" << endl;
|
||||
if (which == 'p' && pdelta && !last_pdelta) {
|
||||
set_widget_name("TransportClockDisplayDelta");
|
||||
last_pdelta = true;
|
||||
} else if (which == 1 && !pdelta && last_pdelta) {
|
||||
} else if (which == 'p' && !pdelta && last_pdelta) {
|
||||
set_widget_name("TransportClockDisplay");
|
||||
last_pdelta = false;
|
||||
} else if (which == 2 && sdelta && !last_sdelta) {
|
||||
} else if (which == 's' && sdelta && !last_sdelta) {
|
||||
set_widget_name("SecondaryClockDisplayDelta");
|
||||
last_sdelta = true;
|
||||
} else if (which == 2 && !sdelta && last_sdelta) {
|
||||
} else if (which == 's' && !sdelta && last_sdelta) {
|
||||
set_widget_name("SecondaryClockDisplay");
|
||||
last_sdelta = false;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class AudioClock : public Gtk::HBox
|
|||
|
||||
Mode mode() const { return _mode; }
|
||||
|
||||
void set (nframes_t, bool force = false, nframes_t offset = 0, int which = 0);
|
||||
void set (nframes_t, bool force = false, nframes_t offset = 0, char which = 0);
|
||||
void set_mode (Mode);
|
||||
|
||||
void set_widget_name (std::string);
|
||||
|
|
Loading…
Reference in New Issue