13
0

use CANVAS_DEBUG_NAME instead of explicit #ifdef to set canvas item name

This commit is contained in:
Paul Davis 2014-03-06 13:26:55 -05:00
parent 37de3e2f67
commit 72517680cc

View File

@ -19,7 +19,10 @@
*/
#include "evoral/Note.hpp"
#include "canvas/rectangle.h"
#include "canvas/debug.h"
#include "note.h"
#include "midi_region_view.h"
#include "public_editor.h"
@ -28,17 +31,11 @@ using namespace ARDOUR;
using namespace ArdourCanvas;
Note::Note (
MidiRegionView& region,
Group* group,
const boost::shared_ptr<NoteType> note,
bool with_events
)
MidiRegionView& region, Group* group, const boost::shared_ptr<NoteType> note, bool with_events)
: NoteBase (region, with_events, note)
, _rectangle (new ArdourCanvas::Rectangle (group))
{
#ifdef CANVAS_DEBUG
_rectangle->name = "note";
#endif
CANVAS_DEBUG_NAME (_rectangle, "note");
set_item (_rectangle);
}