From 1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Mar 2021 14:58:11 +1100 Subject: Change Font to an interface and stop using FontID. Fonts are shared and reference counted using std::shared_ptr. This optimizes memory and reduces potential for allocation bugs. --- src/ScintillaBase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 4830357ed..b46a2207a 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -289,7 +289,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list rcac.right = rcac.left + widthLB; rcac.bottom = static_cast(std::min(static_cast(rcac.top) + heightLB, static_cast(rcPopupBounds.bottom))); ac.lb->SetPositionRelative(rcac, &wMain); - ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font); + ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font.get()); const unsigned int aveCharWidth = static_cast(vs.styles[STYLE_DEFAULT].aveCharWidth); ac.lb->SetAverageCharWidth(aveCharWidth); ac.lb->SetDelegate(this); -- cgit v1.2.3