mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 12:46:32 +01:00
draw clip rect correctly after it is reset\n
This commit is contained in:
parent
efc153d880
commit
9243dcf961
2 changed files with 12 additions and 3 deletions
|
|
@ -304,6 +304,7 @@ MidiView::region_going_away ()
|
||||||
_midi_region.reset ();
|
_midi_region.reset ();
|
||||||
_model.reset ();
|
_model.reset ();
|
||||||
connections_requiring_model.drop_connections();
|
connections_requiring_model.drop_connections();
|
||||||
|
region_connections.drop_connections ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -316,7 +317,8 @@ MidiView::set_region (std::shared_ptr<MidiRegion> mr)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_midi_region->DropReferences.connect (region_going_away_connection, invalidator (*this), std::bind (&MidiView::region_going_away, this), gui_context());
|
_midi_region->DropReferences.connect (region_connections, invalidator (*this), std::bind (&MidiView::region_going_away, this), gui_context());
|
||||||
|
_midi_region->PropertyChanged.connect (region_connections, invalidator (*this), std::bind (&MidiView::region_resized, this, _1), gui_context());
|
||||||
|
|
||||||
set_model (_midi_region->midi_source (0)->model());
|
set_model (_midi_region->midi_source (0)->model());
|
||||||
}
|
}
|
||||||
|
|
@ -1597,7 +1599,14 @@ MidiView::~MidiView ()
|
||||||
void
|
void
|
||||||
MidiView::region_resized (const PropertyChange& what_changed)
|
MidiView::region_resized (const PropertyChange& what_changed)
|
||||||
{
|
{
|
||||||
// XXX RegionView::region_resized(what_changed); // calls RegionView::set_duration()
|
PropertyChange interests;
|
||||||
|
interests.add (ARDOUR::Properties::start);
|
||||||
|
interests.add (ARDOUR::Properties::length);
|
||||||
|
|
||||||
|
if (what_changed.contains (interests)) {
|
||||||
|
size_start_rect ();
|
||||||
|
size_end_rect ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -452,7 +452,7 @@ class MidiView : public virtual sigc::trackable, public LineMerger
|
||||||
|
|
||||||
PBD::ScopedConnectionList connections_requiring_model;
|
PBD::ScopedConnectionList connections_requiring_model;
|
||||||
PBD::ScopedConnection track_going_away_connection;
|
PBD::ScopedConnection track_going_away_connection;
|
||||||
PBD::ScopedConnection region_going_away_connection;
|
PBD::ScopedConnectionList region_connections;
|
||||||
void track_going_away ();
|
void track_going_away ();
|
||||||
void region_going_away ();
|
void region_going_away ();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue