fix some more incorrect casts to CanvasNote rather than CanvasNoteEvent (fixes crashes when a track is in perc mode
git-svn-id: svn://localhost/ardour2/branches/3.0@8273 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9882fe9ab0
commit
df5e700f90
@ -1407,7 +1407,7 @@ void
|
|||||||
NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*ignored*/)
|
NoteResizeDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*ignored*/)
|
||||||
{
|
{
|
||||||
Gdk::Cursor* cursor;
|
Gdk::Cursor* cursor;
|
||||||
ArdourCanvas::CanvasNote* cnote = dynamic_cast<ArdourCanvas::CanvasNote*>(_item);
|
ArdourCanvas::CanvasNoteEvent* cnote = dynamic_cast<ArdourCanvas::CanvasNoteEvent*>(_item);
|
||||||
float x_fraction = cnote->mouse_x_fraction ();
|
float x_fraction = cnote->mouse_x_fraction ();
|
||||||
|
|
||||||
if (x_fraction > 0.0 && x_fraction < 0.25) {
|
if (x_fraction > 0.0 && x_fraction < 0.25) {
|
||||||
@ -1465,7 +1465,7 @@ NoteResizeDrag::motion (GdkEvent* /*event*/, bool /*first_move*/)
|
|||||||
{
|
{
|
||||||
MidiRegionSelection& ms (_editor->get_selection().midi_regions);
|
MidiRegionSelection& ms (_editor->get_selection().midi_regions);
|
||||||
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ++r) {
|
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ++r) {
|
||||||
(*r)->update_resizing (dynamic_cast<ArdourCanvas::CanvasNote*>(_item), at_front, _drags->current_pointer_x() - grab_x(), relative);
|
(*r)->update_resizing (dynamic_cast<ArdourCanvas::CanvasNoteEvent*>(_item), at_front, _drags->current_pointer_x() - grab_x(), relative);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1474,7 +1474,7 @@ NoteResizeDrag::finished (GdkEvent*, bool /*movement_occurred*/)
|
|||||||
{
|
{
|
||||||
MidiRegionSelection& ms (_editor->get_selection().midi_regions);
|
MidiRegionSelection& ms (_editor->get_selection().midi_regions);
|
||||||
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ++r) {
|
for (MidiRegionSelection::iterator r = ms.begin(); r != ms.end(); ++r) {
|
||||||
(*r)->commit_resizing (dynamic_cast<ArdourCanvas::CanvasNote*>(_item), at_front, _drags->current_pointer_x() - grab_x(), relative);
|
(*r)->commit_resizing (dynamic_cast<ArdourCanvas::CanvasNoteEvent*>(_item), at_front, _drags->current_pointer_x() - grab_x(), relative);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2237,7 +2237,7 @@ MidiRegionView::begin_resizing (bool /*at_front*/)
|
|||||||
* as the \a primary note.
|
* as the \a primary note.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
MidiRegionView::update_resizing (ArdourCanvas::CanvasNote* primary, bool at_front, double delta_x, bool relative)
|
MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at_front, double delta_x, bool relative)
|
||||||
{
|
{
|
||||||
bool cursor_set = false;
|
bool cursor_set = false;
|
||||||
|
|
||||||
@ -2306,7 +2306,7 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNote* primary, bool at_fron
|
|||||||
* Parameters the same as for \a update_resizing().
|
* Parameters the same as for \a update_resizing().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
MidiRegionView::commit_resizing (ArdourCanvas::CanvasNote* primary, bool at_front, double delta_x, bool relative)
|
MidiRegionView::commit_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at_front, double delta_x, bool relative)
|
||||||
{
|
{
|
||||||
start_note_diff_command (_("resize notes"));
|
start_note_diff_command (_("resize notes"));
|
||||||
|
|
||||||
|
@ -223,8 +223,8 @@ class MidiRegionView : public RegionView
|
|||||||
*/
|
*/
|
||||||
void begin_resizing(bool at_front);
|
void begin_resizing(bool at_front);
|
||||||
|
|
||||||
void update_resizing (ArdourCanvas::CanvasNote *, bool, double, bool);
|
void update_resizing (ArdourCanvas::CanvasNoteEvent*, bool, double, bool);
|
||||||
void commit_resizing (ArdourCanvas::CanvasNote *, bool, double, bool);
|
void commit_resizing (ArdourCanvas::CanvasNoteEvent*, bool, double, bool);
|
||||||
|
|
||||||
/** Change the channel of the selection.
|
/** Change the channel of the selection.
|
||||||
* @param channel - the channel number of the new channel, zero-based
|
* @param channel - the channel number of the new channel, zero-based
|
||||||
|
Loading…
Reference in New Issue
Block a user