summaryrefslogtreecommitdiff
path: root/src/selectioneditor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-05-24 20:44:33 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-05-24 20:44:33 +0200
commitcb896a4fa1acd9167d3e7ee9f6336a63309eebde (patch)
tree650337e053b670ba1f67d8b2f6da03d43fb0cda0 /src/selectioneditor.cc
parent5f3f9fabf5ad2e1cda638612c3cf863045765a3b (diff)
Add save/load of selections/regions in instruments.
Diffstat (limited to 'src/selectioneditor.cc')
-rw-r--r--src/selectioneditor.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/selectioneditor.cc b/src/selectioneditor.cc
index 98c6161..417059d 100644
--- a/src/selectioneditor.cc
+++ b/src/selectioneditor.cc
@@ -26,11 +26,13 @@
*/
#include "selectioneditor.h"
+#include "project.h"
+
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLabel>
-QLineEdit *createWidget(QString name, QWidget* parent)
+static QLineEdit *createWidget(QString name, QWidget* parent)
{
QHBoxLayout* l = new QHBoxLayout();
@@ -47,8 +49,9 @@ QLineEdit *createWidget(QString name, QWidget* parent)
return edt;
}
-SelectionEditor::SelectionEditor(Selections &s)
+SelectionEditor::SelectionEditor(Selections &s, Instrument& instrument)
: selections(s)
+ , instrument(instrument)
{
cur = SEL_NONE;
@@ -76,6 +79,8 @@ void SelectionEditor::updateSelection()
sel.name = name->text();
selections.update(cur, sel);
+
+ instrument.setSelections(selections);
}
void SelectionEditor::update()