diff --git a/include/automation_editor.h b/include/automation_editor.h index 5abbe5924..14bc49a57 100644 --- a/include/automation_editor.h +++ b/include/automation_editor.h @@ -91,8 +91,8 @@ protected: virtual void wheelEvent( QWheelEvent * _we ); int FASTCALL getLevel( int _y ); - static inline void drawValueRect( QPainter & _p, Uint16 _x, Uint16 _y, - Sint16 _width, Sint16 _height, + static inline void drawValueRect( QPainter & _p, int _x, int _y, + int _width, int _height, const bool _is_selected ); void removeSelection( void ); void selectAll( void ); diff --git a/include/piano_roll.h b/include/piano_roll.h index b10d6543b..852db95dd 100644 --- a/include/piano_roll.h +++ b/include/piano_roll.h @@ -95,8 +95,8 @@ protected: #endif int FASTCALL getKey( int _y ) const; - static inline void drawNoteRect( QPainter & _p, Uint16 _x, Uint16 _y, - Sint16 _width, + static inline void drawNoteRect( QPainter & _p, int _x, int _y, + int _width, const bool _is_selected, const bool _is_step_note ); void removeSelection( void ); diff --git a/src/core/automation_editor.cpp b/src/core/automation_editor.cpp index 50a46c5ee..df9655c9c 100644 --- a/src/core/automation_editor.cpp +++ b/src/core/automation_editor.cpp @@ -438,8 +438,8 @@ void automationEditor::loadSettings( const QDomElement & _this ) inline void automationEditor::drawValueRect( QPainter & _p, - Uint16 _x, Uint16 _y, - Sint16 _width, Sint16 _height, + int _x, int _y, + int _width, int _height, const bool _is_selected ) { QColor current_color( 0xFF, 0xB0, 0x00 ); @@ -452,7 +452,6 @@ inline void automationEditor::drawValueRect( QPainter & _p, _p.setPen( QColor( 0xFF, 0xDF, 0x20 ) ); _p.drawLine( _x - 1, _y, _x + 1, _y ); _p.drawLine( _x, _y - 1, _x, _y + 1 ); - // _p.setPen( QColor( 0xFF, 0x9F, 0x00 ) ); // _p.setPen( QColor( 0xFF, 0xFF, 0x40 ) ); @@ -1440,6 +1439,7 @@ void automationEditor::paintEvent( QPaintEvent * _pe ) rect_width, rect_height, is_selected ); } + else printf("not in range\n"); } while( it != time_map.begin() ); } else diff --git a/src/core/piano_roll.cpp b/src/core/piano_roll.cpp index 77d5fdd61..113af3262 100644 --- a/src/core/piano_roll.cpp +++ b/src/core/piano_roll.cpp @@ -535,8 +535,8 @@ void pianoRoll::loadSettings( const QDomElement & _this ) -inline void pianoRoll::drawNoteRect( QPainter & _p, Uint16 _x, Uint16 _y, - Sint16 _width, const bool _is_selected, +inline void pianoRoll::drawNoteRect( QPainter & _p, int _x, int _y, + int _width, const bool _is_selected, const bool _is_step_note ) { ++_x;