diff layer/TextLayer.h @ 1486:ac0a8addabcf

Merge from branch by-id
author Chris Cannam
date Wed, 17 Jul 2019 14:25:16 +0100
parents 696e569ff21b
children e6362cf5ff1d
line wrap: on
line diff
--- a/layer/TextLayer.h	Thu Jun 13 15:35:01 2019 +0100
+++ b/layer/TextLayer.h	Wed Jul 17 14:25:16 2019 +0100
@@ -62,8 +62,8 @@
 
     bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click
 
-    const Model *getModel() const override { return m_model; }
-    void setModel(TextModel *model);
+    ModelId getModel() const override { return m_model; }
+    void setModel(ModelId model); // a TextModel
 
     PropertyList getProperties() const override;
     QString getPropertyLabel(const PropertyName &) const override;
@@ -78,7 +78,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 &logarithmic, QString &unit) const override;
@@ -100,7 +100,7 @@
 
     bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const;
 
-    TextModel *m_model;
+    ModelId m_model;
     bool m_editing;
     QPoint m_editOrigin;
     Event m_originalPoint;