Salome HOME
Copyright update 2022
[modules/gui.git] / src / Qtx / QtxFontEdit.cxx
index 6d6ecdb72cbd9b10c7a66394f495e43bdea2d637..fa1ebdd73763a344322f6f1e075dfa3b76810549 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -134,7 +134,11 @@ QFont QtxFontEdit::currentFont() const
 */
 void QtxFontEdit::setCurrentFont( const QFont& fnt )
 {
-  myFamily->blockSignals( true );
+  // VSR 25/08/2016: IPAL53224
+  // blocking signals of QFontComboBox breaks its internal business logic
+  // that prevents correct retrieving of available sizes for the font in case
+  // when some non-existent font is replaced by its closest analogue
+  //myFamily->blockSignals( true );
   myCustomFams->blockSignals( true );
   mySize->blockSignals( true );
   myB->blockSignals( true );
@@ -148,7 +152,7 @@ void QtxFontEdit::setCurrentFont( const QFont& fnt )
                     ( fnt.underline() ? Underline : 0 ) | 
                     ( fnt.overline() ? Shadow : 0 ) );
 
-  myFamily->blockSignals( false );
+  //myFamily->blockSignals( false );
   myCustomFams->blockSignals( false );
   mySize->blockSignals( false );
   myB->blockSignals( false );
@@ -376,8 +380,8 @@ void QtxFontEdit::setMode( const int mode )
 
   myMode = mode;
 
-  myFamily->setShown( myMode == Native );
-  myCustomFams->setShown( myMode == Custom );
+  myFamily->setVisible( myMode == Native );
+  myCustomFams->setVisible( myMode == Custom );
 
   updateGeometry();
 }