Commit graph

23 commits

Author SHA1 Message Date
Paul Davis
8b389ee829 amend 365e3ef8e2 to be "more right"
NoteBase-derived note objects must delete their children, because
often they are deleted long before the parent (group) is. However,
in MidiView::clear_events() we used to call _note_group->clear (true)
first, which would delete the canvas items owned by these objects,
without them knowing about it. This made it dangerous for them
to delete those same items in their destructors.

This reverses the ordering so that NoteBase objects are deleted first
(along with their canvas items) and after that we clear _note_group
which will address any danging canvas items created there that are
not owned by a NoteBase-derived object
2025-03-25 14:49:49 -06:00
Paul Davis
365e3ef8e2 midiview: correctly manage NoteBase lifetimes
MidiView::clear_events() deleted the canvas items corresponding to Notes/Hits,
but did not delete the owner NoteBase objects.
2025-03-24 11:43:32 -06:00
Paul Davis
a550b6482f start using the now-compilable MidiView
Nothing yet derives from this, but MIDI display items and drags
do use it.
2024-10-17 07:44:29 -06:00
Paul Davis
2d9a2ad668 lollis: also adjust velocity bars during the drag 2023-06-26 14:18:18 -06:00
Paul Davis
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis
a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Robin Gareus
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Paul Davis
a1df752095 call Note::set_velocity() at an appropriate time 2018-07-03 11:28:01 -04:00
Paul Davis
644a05f60b use new Canvas::Note object for (sustained) note display 2018-07-03 11:21:53 -04:00
Robin Gareus
2f535e3410 fix OSX compilation (flat namespace)
reference to 'Rect' is ambiguous
..../CarbonCore.framework/Headers/MacTypes.h defines
typedef struct Rect
2016-07-11 13:42:42 +02:00
nick_m
39692eed66 Add Note::set (Rect) for optimisation purposes (minimise begin/end changes) 2016-07-10 02:18:37 +10:00
Paul Davis
11cfdd4c6d remove use of TimeRectangle 2015-02-11 21:59:38 -05:00
David Robillard
2588b1cac9 Trim the include tree. 2014-11-30 23:56:19 -05:00
Paul Davis
f1e6b28ab7 use ArdourCanvas::TimeRectangle for regions, notes, markers 2014-11-03 21:48:08 -05:00
Paul Davis
0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
Paul Davis
f48b556888 do not use Item::move() when dragging notes since this resets the Item's position in its group, rather than its coordinates.
This fixes the double-distance/wrongly drawn location of MIDI notes after a drag
2014-03-13 11:02:06 -04:00
Paul Davis
c10896e984 use and wrap Rectangle::set_outline_all() method 2014-03-11 07:38:02 -04:00
Paul Davis
770dbf8fdc remove irrelevant comment 2014-03-07 09:25:18 -05:00
Paul Davis
72517680cc use CANVAS_DEBUG_NAME instead of explicit #ifdef to set canvas item name 2014-03-06 13:26:55 -05:00
Paul Davis
faf5bc982b move construction point 2014-01-20 10:52:45 -05:00
John Emmas
df2b5c90e4 'gtk2_ardour' - In 'Note' c'tor, don't try to set 'rectangle->name' unless 'CANVAS_DEBUG' is defined 2013-10-06 11:00:10 +01:00
John Emmas
f8574fc39d 'gtk2_ardour' - Add namespaces + casting where necessary + general bits of 'correctness' to keep MSVC happy 2013-10-03 09:06:56 +01:00
Paul Davis
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00