aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Style.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-06-22 12:50:03 +1000
committerNeil <nyamatongwe@gmail.com>2014-06-22 12:50:03 +1000
commit068bfb9213d810b1551cdc48fdfd216060253103 (patch)
tree961424276d263ea442f98112aa3bc26dafa92bef /src/Style.cxx
parent318fb4b54beb34a036bfe405127c9329b67ea95f (diff)
downloadscintilla-mirror-068bfb9213d810b1551cdc48fdfd216060253103.tar.gz
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.
Diffstat (limited to 'src/Style.cxx')
-rw-r--r--src/Style.cxx4
1 files changed, 4 insertions, 0 deletions
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