diff layer/NoteLayer.h @ 1470:696e569ff21b by-id

Further layer updates for ById
author Chris Cannam
date Fri, 28 Jun 2019 17:37:22 +0100
parents f792a5001d80
children e6362cf5ff1d
line wrap: on
line diff
--- a/layer/NoteLayer.h	Thu Jun 27 13:16:25 2019 +0100
+++ b/layer/NoteLayer.h	Fri Jun 28 17:37:22 2019 +0100
@@ -68,8 +68,8 @@
     bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
                        bool interactive) override;
 
-    const Model *getModel() const override { return m_model; }
-    void setModel(NoteModel *model);
+    ModelId getModel() const override { return m_model; }
+    void setModel(ModelId model); // a NoteModel
 
     PropertyList getProperties() const override;
     QString getPropertyLabel(const PropertyName &) const override;
@@ -95,7 +95,7 @@
 
     bool isLayerEditable() const override { return true; }
 
-    int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
+    int getCompletion(LayerGeometryProvider *) const override;
 
     bool getValueExtents(double &min, double &max,
                                  bool &log, QString &unit) const override;
@@ -146,7 +146,7 @@
 
     bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const;
 
-    NoteModel *m_model;
+    ModelId m_model;
     bool m_editing;
     int m_dragPointX;
     int m_dragPointY;