[gnote/gnome-40] Fix changing custom font in settings



commit 401ccb7de8c9be0b282496a280193b03b831a269
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Tue May 11 22:55:00 2021 +0300

    Fix changing custom font in settings

 src/preferencesdialog.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index a4350452..f48866b8 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -937,10 +937,10 @@ namespace gnote {
     font_dialog->set_font_name(font_name);
 
     if (Gtk::RESPONSE_OK == font_dialog->run()) {
-      if (font_dialog->get_font_name() != font_name) {
-        m_gnote.preferences().custom_font_face();
-
-        update_font_button (font_dialog->get_font_name());
+      auto new_font = font_dialog->get_font_name();
+      if(new_font != font_name) {
+        m_gnote.preferences().custom_font_face(new_font);
+        update_font_button(new_font);
       }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]