From 4c5a037658bfac000c1a380ed69947a77de2229f Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 12 Sep 2019 13:44:47 +0200 Subject: Fix unsetting variable font values giving wrong font name (Issue 842). --- src/ui/widget/font-selector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 0b096995c..d8897eb3a 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -254,7 +254,8 @@ FontSelector::get_fontspec(bool use_variations) { if (use_variations) { // Clip any font_variation data in 'style' as we'll replace it. - if (auto pos = style.find('@') != Glib::ustring::npos) { + auto pos = style.find('@'); + if (pos != Glib::ustring::npos) { style.erase (pos, style.length()-1); } -- cgit v1.2.3