Legatize::name () reflects its type. Fixes confusing undo record name.
authornick_m <mainsbridge@gmail.com>
Tue, 13 Oct 2015 17:46:33 +0000 (04:46 +1100)
committernick_m <mainsbridge@gmail.com>
Mon, 19 Oct 2015 13:53:30 +0000 (00:53 +1100)
libs/ardour/ardour/legatize.h
libs/ardour/legatize.cc

index 78b384e1c72222b5e04ba1b8adbdab31c708ca66..aba65682a66267948f4b1f00227db9ee37105988 100644 (file)
@@ -45,7 +45,7 @@ public:
                            Evoral::Beats                        position,
                            std::vector<Notes>&                  seqs);
 
-       std::string name() const { return std::string ("legatize"); }
+       std::string name () const { return (_shrink_only ? std::string ("remove overlap") : std::string ("legatize")); }
 
 private:
        bool _shrink_only;
index 0c118a6a48fcb136466bd14df1a2f4fd7fbd49eb..4d3d0f7d0e78e3b0341b0abb0f912355af6b6cb2 100644 (file)
@@ -34,7 +34,7 @@ Legatize::operator()(boost::shared_ptr<ARDOUR::MidiModel> model,
                      Evoral::Beats                        position,
                      std::vector<Legatize::Notes>&        seqs)
 {
-       MidiModel::NoteDiffCommand* cmd = new MidiModel::NoteDiffCommand(model, "legatize");
+       MidiModel::NoteDiffCommand* cmd = new MidiModel::NoteDiffCommand(model, name ());
 
        for (std::vector<Legatize::Notes>::iterator s = seqs.begin(); s != seqs.end(); ++s) {
                for (Legatize::Notes::iterator i = (*s).begin(); i != (*s).end();) {