]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
When python console is created, her font must be set as in preferences
authorasl <asl@opencascade.com>
Mon, 12 Dec 2005 13:02:55 +0000 (13:02 +0000)
committerasl <asl@opencascade.com>
Mon, 12 Dec 2005 13:02:55 +0000 (13:02 +0000)
src/LightApp/LightApp_Application.cxx

index 614f604c513e1122302a35bfe0790ecbc4b50a42..88f104dbeb0b5fc2e8530831bf85aef5dd255758 100644 (file)
@@ -892,7 +892,15 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st
 
   QFont f;
   if( wid->inherits( "PythonConsole" ) )
-    f = ( ( PythonConsole* )wid )->font();
+  {
+    if( resourceMgr()->hasValue( "PyConsole", "font" ) )
+      f = resourceMgr()->fontValue( "PyConsole", "font" );
+    else
+    {
+      f = ( ( PythonConsole* )wid )->font();
+      resourceMgr()->setValue( "PyConsole", "font", f );
+    }
+  }
   else
     f = wid->font();