[gedit-plugins] copy font description we get from context.get_font before modifying it



commit 255a48c71098316f0a0d81fdbb54cfce262213d5
Author: John (J5) Palmieri <johnp redhat com>
Date:   Fri Mar 4 16:54:36 2011 -0500

    copy font description we get from context.get_font before modifying it
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643790

 plugins/textsize/textsize/documenthelper.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/textsize/textsize/documenthelper.py b/plugins/textsize/textsize/documenthelper.py
index 8877172..10fdba2 100644
--- a/plugins/textsize/textsize/documenthelper.py
+++ b/plugins/textsize/textsize/documenthelper.py
@@ -58,7 +58,7 @@ class DocumentHelper(Signals):
 
     def update_default_font(self):
         context = self._view.get_style_context()
-        description = context.get_font(context.get_state())
+        description = context.get_font(context.get_state()).copy()
 
         if not self._last_font or description.hash() != self._last_font.hash():
             self._default_font = description.copy()



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