Transpose midi clips in song editor (#6409)
* Transpose midi clips in song editor
* Fix undo stupidity
* Check boundries when transposing clips
and move transpose function to NoteVector
* Avoid update if nothing has changed
* Make getNoteBounds a separate function
* Rename getNoteBounds to boundsForNotes
* bool operator instead of optional + qobject_cast
* Revert "bool operator instead of optional + qobject_cast"
This reverts commit 98c56a96cf.
* qobject_cast and nullopt
This commit is contained in:
@@ -73,6 +73,7 @@ protected slots:
|
||||
|
||||
void resetName();
|
||||
void changeName();
|
||||
void transposeSelection();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifndef NOTE_H
|
||||
#define NOTE_H
|
||||
|
||||
#include <optional>
|
||||
#include <QVector>
|
||||
|
||||
#include "volume.h"
|
||||
@@ -252,6 +253,18 @@ private:
|
||||
typedef QVector<Note *> NoteVector;
|
||||
|
||||
|
||||
struct NoteBounds
|
||||
{
|
||||
TimePos start;
|
||||
TimePos end;
|
||||
int lowest;
|
||||
int highest;
|
||||
};
|
||||
|
||||
|
||||
std::optional<NoteBounds> boundsForNotes(const NoteVector& notes);
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user