Fix note separator lines from stealing mouse events.
Fix shutdown crash (one of many, namely the least nasty). Failed attempt at getting MIDI edits to apply ASAP (Diskstream::playlist_modified isn't the magic I'd hoped it was). git-svn-id: svn://localhost/ardour2/trunk@2265 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c80e9d4ac9
commit
8f6a131e41
@ -2325,12 +2325,6 @@ Editor::snap_length_beats (nframes_t start)
|
|||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nframes64_t one_second = session->frame_rate();
|
|
||||||
const nframes64_t one_minute = session->frame_rate() * 60;
|
|
||||||
const nframes64_t one_smpte_second = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame());
|
|
||||||
nframes64_t one_smpte_minute = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame() * 60);
|
|
||||||
nframes64_t presnap = start;
|
|
||||||
|
|
||||||
/* FIXME: This could/should also work with non-tempo based snap settings (ie seconds) */
|
/* FIXME: This could/should also work with non-tempo based snap settings (ie seconds) */
|
||||||
|
|
||||||
switch (snap_type) {
|
switch (snap_type) {
|
||||||
|
@ -23,8 +23,10 @@
|
|||||||
|
|
||||||
#include <libgnomecanvasmm.h>
|
#include <libgnomecanvasmm.h>
|
||||||
#include <libgnomecanvasmm/polygon.h>
|
#include <libgnomecanvasmm/polygon.h>
|
||||||
|
#include <ardour/midi_track.h>
|
||||||
#include <ardour/midi_region.h>
|
#include <ardour/midi_region.h>
|
||||||
#include <ardour/midi_model.h>
|
#include <ardour/midi_model.h>
|
||||||
|
#include <ardour/diskstream.h>
|
||||||
#include <ardour/types.h>
|
#include <ardour/types.h>
|
||||||
|
|
||||||
#include "region_view.h"
|
#include "region_view.h"
|
||||||
@ -118,8 +120,6 @@ class MidiRegionView : public RegionView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ARDOUR::MidiModel::DeltaCommand* delta_command() { return _delta_command; }
|
|
||||||
|
|
||||||
void abort_command() {
|
void abort_command() {
|
||||||
delete _delta_command;
|
delete _delta_command;
|
||||||
_delta_command = NULL;
|
_delta_command = NULL;
|
||||||
@ -133,6 +133,7 @@ class MidiRegionView : public RegionView
|
|||||||
_delta_command = NULL;
|
_delta_command = NULL;
|
||||||
}
|
}
|
||||||
_command_mode = None;
|
_command_mode = None;
|
||||||
|
midi_view()->midi_track()->diskstream()->playlist_modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void unique_select(ArdourCanvas::CanvasMidiEvent* ev);
|
void unique_select(ArdourCanvas::CanvasMidiEvent* ev);
|
||||||
|
@ -240,7 +240,6 @@ MidiStreamView::draw_note_separators()
|
|||||||
_note_lines[i]->property_y1() = note_to_y(i);
|
_note_lines[i]->property_y1() = note_to_y(i);
|
||||||
_note_lines[i]->property_y2() = note_to_y(i);
|
_note_lines[i]->property_y2() = note_to_y(i);
|
||||||
_note_lines[i]->show();
|
_note_lines[i]->show();
|
||||||
_note_lines[i]->raise_to_top();
|
|
||||||
} else {
|
} else {
|
||||||
_note_lines[i]->hide();
|
_note_lines[i]->hide();
|
||||||
}
|
}
|
||||||
|
@ -212,11 +212,13 @@ StreamView::playlist_modified (boost::shared_ptr<Diskstream> ds)
|
|||||||
ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_modified_weak), ds));
|
ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::playlist_modified_weak), ds));
|
||||||
|
|
||||||
/* update layers count and the y positions and heights of our regions */
|
/* update layers count and the y positions and heights of our regions */
|
||||||
|
if (ds->playlist()) {
|
||||||
layers = ds->playlist()->top_layer() + 1;
|
layers = ds->playlist()->top_layer() + 1;
|
||||||
update_contents_y_position_and_height ();
|
update_contents_y_position_and_height ();
|
||||||
|
|
||||||
redisplay_diskstream ();
|
redisplay_diskstream ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
|
StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds)
|
||||||
@ -292,7 +294,8 @@ StreamView::region_layered (RegionView* rv)
|
|||||||
/* this used to be + 1, but regions to the left ended up below
|
/* this used to be + 1, but regions to the left ended up below
|
||||||
..something.. and couldn't receive events. why? good question.
|
..something.. and couldn't receive events. why? good question.
|
||||||
*/
|
*/
|
||||||
rv->get_canvas_group()->raise (rv->region()->layer() + 2);
|
/* and now it's + 3 for midi note separator lines */
|
||||||
|
rv->get_canvas_group()->raise (rv->region()->layer() + 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -101,6 +101,7 @@ class Diskstream : public SessionObject
|
|||||||
|
|
||||||
void set_speed (double);
|
void set_speed (double);
|
||||||
void non_realtime_set_speed ();
|
void non_realtime_set_speed ();
|
||||||
|
virtual void playlist_modified ();
|
||||||
|
|
||||||
boost::shared_ptr<Playlist> playlist () { return _playlist; }
|
boost::shared_ptr<Playlist> playlist () { return _playlist; }
|
||||||
|
|
||||||
@ -201,7 +202,6 @@ class Diskstream : public SessionObject
|
|||||||
/* XXX fix this redundancy ... */
|
/* XXX fix this redundancy ... */
|
||||||
|
|
||||||
virtual void playlist_changed (Change);
|
virtual void playlist_changed (Change);
|
||||||
virtual void playlist_modified ();
|
|
||||||
virtual void playlist_deleted (boost::weak_ptr<Playlist>);
|
virtual void playlist_deleted (boost::weak_ptr<Playlist>);
|
||||||
|
|
||||||
virtual void transport_stopped (struct tm&, time_t, bool abort) = 0;
|
virtual void transport_stopped (struct tm&, time_t, bool abort) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user