Suspend signal emission of Locations during Drag

This significantly speeds up Location Drag/motion
This commit is contained in:
Robin Gareus 2023-12-08 21:48:23 +01:00
parent 153c7e289d
commit 067a124fd1
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 1 deletions

View File

@ -4346,7 +4346,7 @@ MarkerDrag::~MarkerDrag ()
MarkerDrag::CopiedLocationMarkerInfo::CopiedLocationMarkerInfo (Location* l, ArdourMarker* m)
{
location = new Location (*l);
location = new Location (*l, true);
markers.push_back (m);
move_both = false;
}
@ -4431,6 +4431,7 @@ MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
if (!l) {
continue;
}
lcs.push_back (l);
if (l->is_mark ()) {
_copied_locations.push_back (CopiedLocationMarkerInfo (l, *i));

View File

@ -1176,6 +1176,8 @@ private:
CopiedLocationMarkerInfo (ARDOUR::Location* l, ArdourMarker* m);
};
std::vector<ARDOUR::Location::ChangeSuspender> lcs;
typedef std::list<CopiedLocationMarkerInfo> CopiedLocationInfo;
CopiedLocationInfo _copied_locations;
ArdourCanvas::Points _points;