prevent trim cursors appearing, and prevent note trimming, when in a MIDI note that is too small on-screen. avoids silliness with trim cursors appearing while drawing small notes on screen, though really, it would nice to avoid them appearing ever in a note that was just added. not sure how to do that.

git-svn-id: svn://localhost/ardour2/branches/3.0@9077 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-03-05 23:00:49 +00:00
parent fb2ef7cb9a
commit f649d775bc
6 changed files with 30 additions and 17 deletions

View file

@ -95,10 +95,10 @@ class CanvasNoteEvent : virtual public sigc::trackable
virtual void set_outline_color(uint32_t c) = 0;
virtual void set_fill_color(uint32_t c) = 0;
virtual double x1() = 0;
virtual double y1() = 0;
virtual double x2() = 0;
virtual double y2() = 0;
virtual double x1() const = 0;
virtual double y1() const = 0;
virtual double x2() const = 0;
virtual double y2() const = 0;
float mouse_x_fraction() const { return _mouse_x_fraction; }
float mouse_y_fraction() const { return _mouse_y_fraction; }
@ -143,7 +143,8 @@ class CanvasNoteEvent : virtual public sigc::trackable
static const uint32_t midi_channel_colors[16];
bool mouse_near_ends () const;
bool big_enough_to_trim () const;
protected:
enum State { None, Pressed, Dragging };