]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for problem: Problems with fonts in Python console when you change properties.
authormzn <mzn@opencascade.com>
Thu, 16 Feb 2006 12:56:56 +0000 (12:56 +0000)
committermzn <mzn@opencascade.com>
Thu, 16 Feb 2006 12:56:56 +0000 (12:56 +0000)
src/Qtx/QtxListResourceEdit.cxx

index 60a5fbe4cf8c672c2fa0fd4078489572660d7f61..038e189b7c22b8bbda709caf09db6cfb1d8e4529 100644 (file)
@@ -39,6 +39,7 @@
 #include <qfontdatabase.h>
 #include <qfileinfo.h>
 #include <qfiledialog.h>
+#include <qapplication.h>
 
 #include "QtxIntSpinBox.h"
 #include "QtxDblSpinBox.h"
@@ -1130,6 +1131,9 @@ void QtxListResourceEdit::FontItem::setFamily( const QString& f )
     if( deffam.canCast( QVariant::String ) )
       curtext = deffam.toString();
   }
+  
+  if ( curtext.isEmpty() )
+    curtext = (QApplication::font()).family();
 
   int idx = -1;
   for ( int i = 0; i < (int)myFamilies->count() && idx < 0; i++ )