aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-04-06 20:44:19 +1000
committernyamatongwe <unknown>2012-04-06 20:44:19 +1000
commitce56e4be127445696112329bfeb0d257be43af07 (patch)
tree3199fea62034c46ee88acf6cadbaf03f15c92162 /src/Editor.h
parent40e62429d86a33cfa7be424800a72a51962eeed7 (diff)
downloadscintilla-mirror-ce56e4be127445696112329bfeb0d257be43af07.tar.gz
Bug #3513946. Make printing work when Direct2D is used for on screen drawing.
This will stop Scintilla from crashing. From Marko Njezic.
Diffstat (limited to 'src/Editor.h')
-rw-r--r--src/Editor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.h b/src/Editor.h
index b407789a1..bdb0f6b30 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -572,9 +572,9 @@ class AutoSurface {
private:
Surface *surf;
public:
- AutoSurface(Editor *ed) : surf(0) {
+ AutoSurface(Editor *ed, int technology = -1) : surf(0) {
if (ed->wMain.GetID()) {
- surf = Surface::Allocate(ed->technology);
+ surf = Surface::Allocate(technology != -1 ? technology : ed->technology);
if (surf) {
surf->Init(ed->wMain.GetID());
surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage());
@@ -582,9 +582,9 @@ public:
}
}
}
- AutoSurface(SurfaceID sid, Editor *ed) : surf(0) {
+ AutoSurface(SurfaceID sid, Editor *ed, int technology = -1) : surf(0) {
if (ed->wMain.GetID()) {
- surf = Surface::Allocate(ed->technology);
+ surf = Surface::Allocate(technology != -1 ? technology : ed->technology);
if (surf) {
surf->Init(sid, ed->wMain.GetID());
surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage());