mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
Delete region-editor of Pianoroll Window
This fixes `SessionHandleRef exists across session deletion! Dynamic type: ARDOUR::MidiRegion`
This commit is contained in:
parent
ba7fa1b33f
commit
3aaff8ff14
1 changed files with 3 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ using namespace ARDOUR;
|
|||
PianorollWindow::PianorollWindow (std::string const & name, Session& s)
|
||||
: ArdourWindow (string_compose ("%1 - %2", PROGRAM_NAME, name))
|
||||
, pianoroll (new Pianoroll (name))
|
||||
, region_editor (nullptr)
|
||||
{
|
||||
pianoroll->set_session (&s);
|
||||
pianoroll->viewport().set_size_request (600, 120);
|
||||
|
|
@ -43,6 +44,7 @@ PianorollWindow::PianorollWindow (std::string const & name, Session& s)
|
|||
PianorollWindow::~PianorollWindow ()
|
||||
{
|
||||
delete pianoroll;
|
||||
delete region_editor;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -51,6 +53,7 @@ PianorollWindow::set (std::shared_ptr<MidiTrack> track, std::shared_ptr<MidiRegi
|
|||
pianoroll->set_track (track);
|
||||
pianoroll->set_region (region);
|
||||
|
||||
delete region_editor;
|
||||
region_editor = new RegionEditor (pianoroll->session(), region);
|
||||
hpacker.pack_start (*region_editor, false, false);
|
||||
hpacker.pack_start (pianoroll->contents(), true, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue