Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up PianoRoll selection #6170

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,14 @@ class PianoRoll : public QWidget
void focusOutEvent( QFocusEvent * ) override;
void focusInEvent( QFocusEvent * ) override;

int getTick(int x) const;
int getKey( int y ) const;
int xCoordOfTick(int tick) const;
int yCoordOfKey(int key) const;

void drawNoteRect( QPainter & p, int x, int y,
int width, const Note * n, const QColor & noteCol, const QColor & noteTextColor,
const QColor & selCol, const int noteOpc, const bool borderless, bool drawNoteName );
void removeSelection();
void selectAll();
NoteVector getSelectedNotes() const;
void selectNotesOnKey();
Expand Down Expand Up @@ -369,10 +372,10 @@ protected slots:
NoteEditMode m_noteEditMode;
GridMode m_gridMode;

int m_selectStartTick;
int m_selectedTick;
int m_selectStartKey;
int m_selectedKeys;
int m_selectStartTick = 0; //!< Tick where mouse pressed down
int m_selectEndTick = 0;
int m_selectStartKey = 0; //!< Key where mouse pressed down
int m_selectEndKey = 0;

// boundary box around all selected notes when dragging
int m_moveBoundaryLeft;
Expand Down
Loading