From 0fc9480586d8e7be20fbb7d89b86569cadc13b23 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sun, 14 Jun 2020 22:21:52 +0200 Subject: [PATCH] Make sure that after_reading is called when loading a Symbol. This fixes #68 --- CHANGES.txt | 1 + src/data/symbol.cpp | 3 +++ src/data/symbol.hpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 584c938c..8885930c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ Bug fixes: * Fixed: multiple keywords that matched in the same place both showed reminder text. (#70) Now, when there are overlapping matches the longest one is used. * Fixed: Slice Image window defaulting to Force to Fit (#69) + * Fixed: Wide set symbols being shrunk down (#68) ------------------------------------------------------------------------------ -- 2.1.0, 2020-06-01 diff --git a/src/data/symbol.cpp b/src/data/symbol.cpp index 7100f616..3ae663ee 100644 --- a/src/data/symbol.cpp +++ b/src/data/symbol.cpp @@ -335,6 +335,9 @@ void Symbol::after_reading(Version v) { SymbolGroup::after_reading(v); updateBounds(); } +void after_reading(Symbol& symbol, Version v) { + symbol.after_reading(v); +} double Symbol::aspectRatio() const { // Margin between the edges and the symbol. diff --git a/src/data/symbol.hpp b/src/data/symbol.hpp index 2a6aeeca..affba584 100644 --- a/src/data/symbol.hpp +++ b/src/data/symbol.hpp @@ -293,7 +293,9 @@ public: DECLARE_REFLECTION_OVERRIDE(); void after_reading(Version) override; + friend void after_reading(Symbol&, Version); }; +void after_reading(Symbol&, Version); /// A default symbol: a square SymbolP default_symbol();