13
0

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:
David Robillard 2007-08-07 20:51:24 +00:00
parent c80e9d4ac9
commit 8f6a131e41
5 changed files with 16 additions and 19 deletions

View File

@ -2325,12 +2325,6 @@ Editor::snap_length_beats (nframes_t start)
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) */
switch (snap_type) {

View File

@ -23,8 +23,10 @@
#include <libgnomecanvasmm.h>
#include <libgnomecanvasmm/polygon.h>
#include <ardour/midi_track.h>
#include <ardour/midi_region.h>
#include <ardour/midi_model.h>
#include <ardour/diskstream.h>
#include <ardour/types.h>
#include "region_view.h"
@ -118,8 +120,6 @@ class MidiRegionView : public RegionView
}
}
//ARDOUR::MidiModel::DeltaCommand* delta_command() { return _delta_command; }
void abort_command() {
delete _delta_command;
_delta_command = NULL;
@ -133,6 +133,7 @@ class MidiRegionView : public RegionView
_delta_command = NULL;
}
_command_mode = None;
midi_view()->midi_track()->diskstream()->playlist_modified();
}
void unique_select(ArdourCanvas::CanvasMidiEvent* ev);

View File

@ -240,7 +240,6 @@ MidiStreamView::draw_note_separators()
_note_lines[i]->property_y1() = note_to_y(i);
_note_lines[i]->property_y2() = note_to_y(i);
_note_lines[i]->show();
_note_lines[i]->raise_to_top();
} else {
_note_lines[i]->hide();
}

View File

@ -212,10 +212,12 @@ StreamView::playlist_modified (boost::shared_ptr<Diskstream> 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 */
layers = ds->playlist()->top_layer() + 1;
update_contents_y_position_and_height ();
if (ds->playlist()) {
layers = ds->playlist()->top_layer() + 1;
update_contents_y_position_and_height ();
redisplay_diskstream ();
redisplay_diskstream ();
}
}
void
@ -292,7 +294,8 @@ StreamView::region_layered (RegionView* rv)
/* this used to be + 1, but regions to the left ended up below
..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

View File

@ -82,7 +82,7 @@ class Diskstream : public SessionObject
void set_persistent_align_style (AlignStyle a) { _persistent_alignment_style = a; }
nframes_t roll_delay() const { return _roll_delay; }
void set_roll_delay (nframes_t);
void set_roll_delay (nframes_t);
bool record_enabled() const { return g_atomic_int_get (&_record_enabled); }
virtual void set_record_enabled (bool yn) = 0;
@ -101,6 +101,7 @@ class Diskstream : public SessionObject
void set_speed (double);
void non_realtime_set_speed ();
virtual void playlist_modified ();
boost::shared_ptr<Playlist> playlist () { return _playlist; }
@ -124,8 +125,8 @@ class Diskstream : public SessionObject
virtual void monitor_input (bool) {}
nframes_t capture_offset() const { return _capture_offset; }
virtual void set_capture_offset ();
nframes_t capture_offset() const { return _capture_offset; }
virtual void set_capture_offset ();
bool slaved() const { return _slaved; }
void set_slaved(bool yn) { _slaved = yn; }
@ -145,8 +146,8 @@ class Diskstream : public SessionObject
sigc::signal<void> AlignmentStyleChanged;
sigc::signal<void,Location *> LoopSet;
static sigc::signal<void> DiskOverrun;
static sigc::signal<void> DiskUnderrun;
static sigc::signal<void> DiskOverrun;
static sigc::signal<void> DiskUnderrun;
protected:
friend class Session;
@ -201,7 +202,6 @@ class Diskstream : public SessionObject
/* XXX fix this redundancy ... */
virtual void playlist_changed (Change);
virtual void playlist_modified ();
virtual void playlist_deleted (boost::weak_ptr<Playlist>);
virtual void transport_stopped (struct tm&, time_t, bool abort) = 0;