mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
xfade editor speedup from markus s., and a fix for the reset button in that editor
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@1929 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
729abf0d14
commit
f51d4d0f09
1 changed files with 16 additions and 16 deletions
|
|
@ -721,6 +721,20 @@ CrossfadeEditor::redraw ()
|
|||
void
|
||||
CrossfadeEditor::apply_preset (Preset *preset)
|
||||
{
|
||||
|
||||
WhichFade wf = find(fade_in_presets->begin(), fade_in_presets->end(), preset) != fade_in_presets->end() ? In : Out;
|
||||
|
||||
if (current != wf) {
|
||||
|
||||
if (wf == In) {
|
||||
select_in_button.clicked();
|
||||
} else {
|
||||
select_out_button.clicked();
|
||||
}
|
||||
|
||||
curve_select_clicked (wf);
|
||||
}
|
||||
|
||||
for (list<Point*>::iterator i = fade[current].points.begin(); i != fade[current].points.end(); ++i) {
|
||||
delete *i;
|
||||
}
|
||||
|
|
@ -820,6 +834,8 @@ CrossfadeEditor::reset ()
|
|||
{
|
||||
set (xfade->fade_in(), In);
|
||||
set (xfade->fade_out(), Out);
|
||||
|
||||
curve_select_clicked (current);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -980,14 +996,6 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
|||
(*i)->box->show ();
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
|
||||
(*i)->set_sensitive (false);
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_in_buttons.begin(); i != fade_in_buttons.end(); ++i) {
|
||||
(*i)->set_sensitive (true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
for (vector<ArdourCanvas::WaveView*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
|
|
@ -1011,14 +1019,6 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
|||
(*i)->box->show();
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
|
||||
(*i)->set_sensitive (true);
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_in_buttons.begin(); i != fade_in_buttons.end(); ++i) {
|
||||
(*i)->set_sensitive (false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue