arguably cleaner tweak to previous commit
git-svn-id: svn://localhost/ardour2/branches/3.0@12479 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f1505b631d
commit
9d40a072a4
|
@ -200,7 +200,7 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd)
|
||||||
gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
|
gain_line.reset (new AudioRegionGainLine (line_name, *this, *group, audio_region()->envelope()));
|
||||||
}
|
}
|
||||||
|
|
||||||
gain_line->set_visibility (automation_line_visibility());
|
update_envelope_visibility ();
|
||||||
gain_line->reset ();
|
gain_line->reset ();
|
||||||
|
|
||||||
set_height (trackview.current_height());
|
set_height (trackview.current_height());
|
||||||
|
@ -494,7 +494,7 @@ AudioRegionView::set_height (gdouble height)
|
||||||
if ((height/wcnt) < NAME_HIGHLIGHT_THRESH) {
|
if ((height/wcnt) < NAME_HIGHLIGHT_THRESH) {
|
||||||
gain_line->hide ();
|
gain_line->hide ();
|
||||||
} else {
|
} else {
|
||||||
gain_line->set_visibility (automation_line_visibility());
|
update_envelope_visibility ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE) - 2);
|
gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE) - 2);
|
||||||
|
@ -850,16 +850,20 @@ AudioRegionView::temporarily_hide_envelope ()
|
||||||
void
|
void
|
||||||
AudioRegionView::unhide_envelope ()
|
AudioRegionView::unhide_envelope ()
|
||||||
{
|
{
|
||||||
if (gain_line) {
|
update_envelope_visibility ();
|
||||||
gain_line->set_visibility (automation_line_visibility());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioRegionView::update_envelope_visible ()
|
AudioRegionView::update_envelope_visibility ()
|
||||||
{
|
{
|
||||||
if (gain_line) {
|
if (!gain_line) {
|
||||||
gain_line->set_visibility (automation_line_visibility());
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseGain) {
|
||||||
|
gain_line->add_visibility (AutomationLine::Line);
|
||||||
|
} else {
|
||||||
|
gain_line->hide ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1024,7 +1028,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
||||||
|
|
||||||
/* don't create points that can't be seen */
|
/* don't create points that can't be seen */
|
||||||
|
|
||||||
gain_line->set_visibility (automation_line_visibility());
|
update_envelope_visibility ();
|
||||||
|
|
||||||
x = ev->button.x;
|
x = ev->button.x;
|
||||||
y = ev->button.y;
|
y = ev->button.y;
|
||||||
|
@ -1801,12 +1805,3 @@ AudioRegionView::drag_end ()
|
||||||
/* fades will be redrawn if they changed */
|
/* fades will be redrawn if they changed */
|
||||||
}
|
}
|
||||||
|
|
||||||
AutomationLine::VisibleAspects
|
|
||||||
AudioRegionView::automation_line_visibility () const
|
|
||||||
{
|
|
||||||
if (Config->get_show_region_gain() || trackview.editor().current_mouse_mode() == Editing::MouseGain) {
|
|
||||||
return AutomationLine::Line;
|
|
||||||
} else {
|
|
||||||
return AutomationLine::VisibleAspects (0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ class AudioRegionView : public RegionView
|
||||||
void temporarily_hide_envelope (); ///< Dangerous!
|
void temporarily_hide_envelope (); ///< Dangerous!
|
||||||
void unhide_envelope (); ///< Dangerous!
|
void unhide_envelope (); ///< Dangerous!
|
||||||
|
|
||||||
void update_envelope_visible ();
|
void update_envelope_visibility ();
|
||||||
void set_waveform_visible (bool yn);
|
void set_waveform_visible (bool yn);
|
||||||
void set_waveform_shape (ARDOUR::WaveformShape);
|
void set_waveform_shape (ARDOUR::WaveformShape);
|
||||||
void set_waveform_scale (ARDOUR::WaveformScale);
|
void set_waveform_scale (ARDOUR::WaveformScale);
|
||||||
|
|
|
@ -473,7 +473,6 @@ Editor::mouse_mode_toggled (MouseMode m)
|
||||||
}
|
}
|
||||||
|
|
||||||
set_canvas_cursor ();
|
set_canvas_cursor ();
|
||||||
cerr << "mouse-driven sgev\n";
|
|
||||||
set_gain_envelope_visibility ();
|
set_gain_envelope_visibility ();
|
||||||
|
|
||||||
MouseModeChanged (); /* EMIT SIGNAL */
|
MouseModeChanged (); /* EMIT SIGNAL */
|
||||||
|
|
|
@ -4855,7 +4855,7 @@ Editor::set_region_gain_visibility (RegionView* rv)
|
||||||
{
|
{
|
||||||
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (rv);
|
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (rv);
|
||||||
if (arv) {
|
if (arv) {
|
||||||
arv->update_envelope_visible ();
|
arv->update_envelope_visibility();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user