#include <libgnomecanvasmm/line.h>
+#include "pbd/memento_command.h"
#include "ardour/automation_list.h"
#include "evoral/Curve.hpp"
#include "ardour/crossfade.h"
void
CrossfadeEditor::apply ()
{
+ _session->begin_reversible_command (_("Edit crossfade"));
+
+ XMLNode& before = xfade->get_state ();
+
_apply_to (xfade);
+
+ _session->add_command (new MementoCommand<Crossfade> (*xfade.get(), &before, &xfade->get_state()));
+ _session->commit_reversible_command ();
}
void
crossfade_changed (all_crossfade_properties);
crossfade->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&CrossfadeView::crossfade_changed, this, _1), gui_context());
+ crossfade->FadesChanged.connect (*this, invalidator (*this), ui_bind (&CrossfadeView::crossfade_fades_changed, this), gui_context());
ColorsChanged.connect (sigc::mem_fun (*this, &CrossfadeView::color_handler));
}
{
group->hide();
}
+
+void
+CrossfadeView::crossfade_fades_changed ()
+{
+ redraw_curves ();
+}
ArdourCanvas::Item *active_button;
void crossfade_changed (const PBD::PropertyChange&);
+ void crossfade_fades_changed ();
void active_changed ();
void redraw_curves ();
void color_handler ();
}
items.push_back (MenuElem (str, sigc::bind (sigc::mem_fun(*this, &Editor::toggle_xfade_active), boost::weak_ptr<Crossfade> (xfade))));
- items.push_back (MenuElem (_("Edit"), sigc::bind (sigc::mem_fun(*this, &Editor::edit_xfade), boost::weak_ptr<Crossfade> (xfade))));
+ items.push_back (MenuElem (_("Edit..."), sigc::bind (sigc::mem_fun(*this, &Editor::edit_xfade), boost::weak_ptr<Crossfade> (xfade))));
if (xfade->can_follow_overlap()) {
static framecnt_t short_xfade_length() { return _short_xfade_length; }
static void set_short_xfade_length (framecnt_t n);
+ /** emitted when the actual fade curves change, as opposed to one of the Stateful properties */
+ PBD::Signal0<void> FadesChanged;
+
private:
friend struct CrossfadeComparePtr;
friend class AudioPlaylist;
_fade_out.thaw ();
PropertyChanged (what_changed); /* EMIT SIGNAL */
+ FadesChanged (); /* EMIT SIGNAL */
return 0;
}