diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-10-12 22:24:05 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-10-12 22:24:05 +0000 |
| commit | a970dc423d59ea844bdb1af48d5d9419a5e2a287 (patch) | |
| tree | 8f6a51df0574fe048ae7e791f276e72716aa090c /src/ui/widget/unit-tracker.h | |
| parent | Fix crash with experimental lpe tool. (diff) | |
| download | inkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.tar.gz inkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.zip | |
Units: stop newing Unit objects. pass around pointers to "undeletable" Unit objects in the UnitTable. I think we should move to using indexed units, and pass around the index of the unit in the unittable, or smth like that... ?
(bzr r12679)
Diffstat (limited to 'src/ui/widget/unit-tracker.h')
| -rw-r--r-- | src/ui/widget/unit-tracker.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/widget/unit-tracker.h b/src/ui/widget/unit-tracker.h index 19559ae1c..61bb556ef 100644 --- a/src/ui/widget/unit-tracker.h +++ b/src/ui/widget/unit-tracker.h @@ -36,9 +36,9 @@ public: void setActiveUnit(Inkscape::Util::Unit const *unit); void setActiveUnitByAbbr(gchar const *abbr); - Inkscape::Util::Unit getActiveUnit() const; + Inkscape::Util::Unit const * getActiveUnit() const; - void addUnit(Inkscape::Util::Unit const &u); + void addUnit(Inkscape::Util::Unit const *u); void addAdjustment(GtkAdjustment *adj); void setFullVal(GtkAdjustment *adj, gdouble val); @@ -52,13 +52,13 @@ private: static void _actionFinalizedCB(gpointer data, GObject *where_the_object_was); static void _adjustmentFinalizedCB(gpointer data, GObject *where_the_object_was); void _setActive(gint index); - void _fixupAdjustments(Inkscape::Util::Unit const oldUnit, Inkscape::Util::Unit const newUnit); + void _fixupAdjustments(Inkscape::Util::Unit const *oldUnit, Inkscape::Util::Unit const *newUnit); void _actionFinalized(GObject *where_the_object_was); void _adjustmentFinalized(GObject *where_the_object_was); gint _active; bool _isUpdating; - Inkscape::Util::Unit _activeUnit; + Inkscape::Util::Unit const *_activeUnit; bool _activeUnitInitialized; GtkListStore *_store; GSList *_unitList; |
