get temporal zoom workign in MidiCueEditor
and remove qite a bit of debug output
This commit is contained in:
parent
76e0615827
commit
74a94f5b25
|
@ -2401,7 +2401,7 @@ EditingContext::idle_visual_changer ()
|
|||
/* set_horizontal_position() below (and maybe other calls) call
|
||||
gtk_main_iteration(), so it's possible that a signal will be handled
|
||||
half-way through this method. If this signal wants an
|
||||
idle_visual_changer we must schedule another one after this one, so
|
||||
idle_visual_changer we must schedule another one after this one, soa
|
||||
mark the idle_handler_id as -1 here to allow that. Also make a note
|
||||
that we are doing the visual change, so that changes in response to
|
||||
super-rapid-screen-update can be dropped if we are still processing
|
||||
|
@ -2458,3 +2458,14 @@ EditingContext::reset_zoom (samplecnt_t spp)
|
|||
pending_visual_change.samples_per_pixel = spp;
|
||||
ensure_visual_change_idle_handler ();
|
||||
}
|
||||
|
||||
void
|
||||
EditingContext::pre_render ()
|
||||
{
|
||||
visual_change_queued = false;
|
||||
|
||||
if (pending_visual_change.pending != 0) {
|
||||
ensure_visual_change_idle_handler();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -375,6 +375,7 @@ public:
|
|||
virtual void mouse_mode_toggled (Editing::MouseMode) = 0;
|
||||
|
||||
bool on_velocity_scroll_event (GdkEventScroll*);
|
||||
void pre_render ();
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
|
|
|
@ -4238,16 +4238,6 @@ Editor::queue_visual_videotimeline_update ()
|
|||
ensure_visual_change_idle_handler ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::pre_render ()
|
||||
{
|
||||
visual_change_queued = false;
|
||||
|
||||
if (pending_visual_change.pending != 0) {
|
||||
ensure_visual_change_idle_handler();
|
||||
}
|
||||
}
|
||||
|
||||
struct EditorOrderTimeAxisSorter {
|
||||
bool operator() (const TimeAxisView* a, const TimeAxisView* b) const {
|
||||
return a->order () < b->order ();
|
||||
|
|
|
@ -1055,8 +1055,6 @@ private:
|
|||
|
||||
void tie_vertical_scrolling ();
|
||||
|
||||
void pre_render ();
|
||||
|
||||
void visual_changer (const VisualChange&);
|
||||
|
||||
/* track views */
|
||||
|
|
|
@ -276,7 +276,7 @@ Editor::initialize_canvas ()
|
|||
_track_canvas->signal_enter_notify_event().connect (sigc::mem_fun(*this, &Editor::entered_track_canvas), false);
|
||||
_track_canvas->set_can_focus ();
|
||||
|
||||
_track_canvas->PreRender.connect (sigc::mem_fun(*this, &Editor::pre_render));
|
||||
_track_canvas->PreRender.connect (sigc::mem_fun(*this, &EditingContext::pre_render));
|
||||
|
||||
/* set up drag-n-drop */
|
||||
|
||||
|
|
|
@ -190,6 +190,8 @@ MidiCueEditor::build_canvas ()
|
|||
_canvas->signal_event().connect (sigc::mem_fun (*this, &MidiCueEditor::canvas_pre_event), false);
|
||||
dynamic_cast<ArdourCanvas::GtkCanvas*>(_canvas)->use_nsglview (UIConfiguration::instance().get_nsgl_view_mode () == NSGLHiRes);
|
||||
|
||||
_canvas->PreRender.connect (sigc::mem_fun(*this, &EditingContext::pre_render));
|
||||
|
||||
/* scroll group for items that should not automatically scroll
|
||||
* (e.g verbose cursor). It shares the canvas coordinate space.
|
||||
*/
|
||||
|
@ -513,8 +515,6 @@ MidiCueEditor::button_press_handler_2 (ArdourCanvas::Item*, GdkEvent*, ItemType)
|
|||
bool
|
||||
MidiCueEditor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
bool were_dragging = false;
|
||||
|
||||
if (!Keyboard::is_context_menu_event (&event->button)) {
|
||||
|
||||
/* see if we're finishing a drag */
|
||||
|
@ -526,8 +526,6 @@ MidiCueEditor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event
|
|||
/* grab dragged, so do nothing else */
|
||||
return true;
|
||||
}
|
||||
|
||||
were_dragging = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -595,11 +593,9 @@ MidiCueEditor::key_press_handler (ArdourCanvas::Item*, GdkEvent* ev, ItemType)
|
|||
switch (ev->key.keyval) {
|
||||
case GDK_d:
|
||||
set_mouse_mode (Editing::MouseDraw);
|
||||
std::cerr << "draw\n";
|
||||
break;
|
||||
case GDK_e:
|
||||
set_mouse_mode (Editing::MouseContent);
|
||||
std::cerr << "content/edit\n";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -658,8 +654,6 @@ edit_last_mark_label (std::vector<ArdourCanvas::Ruler::Mark>& marks, const std::
|
|||
void
|
||||
MidiCueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, samplepos_t leftmost, samplepos_t rightmost, gint /*maxchars*/)
|
||||
{
|
||||
std::cerr << "MCE:mgb s = " << _session << std::endl;
|
||||
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -1003,14 +997,9 @@ MidiCueEditor::metric_get_bbt (std::vector<ArdourCanvas::Ruler::Mark>& marks, sa
|
|||
void
|
||||
MidiCueEditor::mouse_mode_toggled (Editing::MouseMode m)
|
||||
{
|
||||
|
||||
std::cerr << "MMT " << enum_2_string (m) << std::endl;
|
||||
|
||||
Glib::RefPtr<Gtk::Action> act = get_mouse_mode_action (m);
|
||||
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic (act);
|
||||
|
||||
std::cerr << "active ? " << tact->get_active() << std::endl;
|
||||
|
||||
if (!tact->get_active()) {
|
||||
/* this was just the notification that the old mode has been
|
||||
* left. we'll get called again with the new mode active in a
|
||||
|
@ -1409,6 +1398,14 @@ MidiCueEditor::visual_changer (const VisualChange& vc)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiCueEditor::on_samples_per_pixel_changed ()
|
||||
{
|
||||
if (view) {
|
||||
view->set_samples_per_pixel (samples_per_pixel);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiCueEditor::midi_action (void (MidiView::*method)())
|
||||
{
|
||||
|
|
|
@ -123,6 +123,7 @@ class MidiCueEditor : public CueEditor
|
|||
void mouse_mode_toggled (Editing::MouseMode);
|
||||
|
||||
void escape ();
|
||||
void on_samples_per_pixel_changed ();
|
||||
|
||||
private:
|
||||
ArdourCanvas::GtkCanvasViewport* _canvas_viewport;
|
||||
|
|
|
@ -114,7 +114,5 @@ MidiCueView::set_samples_per_pixel (double spp)
|
|||
|
||||
EditingContext::TempoMapScope tms (_editing_context, map);
|
||||
|
||||
std::cerr << "for duration of " << duration << " pixels " << _editing_context.duration_to_pixels (duration) << std::endl;
|
||||
|
||||
reset_width_dependent_items (_editing_context.duration_to_pixels (duration));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user