From 77b174e27eb28ffce6794588d0de1433bffe7672 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Jun 2014 12:50:03 +1000 Subject: Drawing and measuring should not change ViewStyle which is set by the container so mark ViewStyle parameters as const. Provide a FontAlias copy constructor and use it to work around non-const Font arguments to Surface when sourced from const ViewStyle. --- src/Style.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Style.cxx') diff --git a/src/Style.cxx b/src/Style.cxx index 8b5b42dbf..4297fa7cc 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -19,6 +19,10 @@ using namespace Scintilla; FontAlias::FontAlias() { } +FontAlias::FontAlias(const FontAlias &other) { + SetID(other.fid); +} + FontAlias::~FontAlias() { SetID(0); // ~Font will not release the actual font resource since it is now 0 -- cgit v1.2.3