Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Correctly restore font and character for font marker widget
- Loading branch information
|
@@ -114,6 +114,12 @@ void CharacterWidget::updateColumns( int cols ) |
|
|
update(); |
|
|
} |
|
|
|
|
|
void CharacterWidget::setCharacter( const QChar& character ) |
|
|
{ |
|
|
lastKey = character.unicode(); |
|
|
update(); |
|
|
} |
|
|
|
|
|
//! [3] |
|
|
QSize CharacterWidget::sizeHint() const |
|
|
{ |
|
|
|
@@ -76,6 +76,7 @@ class GUI_EXPORT CharacterWidget : public QWidget |
|
|
void updateStyle( const QString &fontStyle ); |
|
|
void updateFontMerging( bool enable ); |
|
|
void updateColumns( int cols ); |
|
|
void setCharacter( const QChar& character ); |
|
|
|
|
|
signals: |
|
|
void characterSelected( const QChar &character ); |
|
|
|
@@ -2491,9 +2491,10 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer ) |
|
|
// layer type is correct, we can do the cast |
|
|
mLayer = static_cast<QgsFontMarkerSymbolLayerV2*>( layer ); |
|
|
|
|
|
QFont layerFont( mLayer->fontFamily() ); |
|
|
// set values |
|
|
cboFont->blockSignals( true ); |
|
|
cboFont->setCurrentFont( QFont( mLayer->fontFamily() ) ); |
|
|
cboFont->setCurrentFont( layerFont ); |
|
|
cboFont->blockSignals( false ); |
|
|
spinSize->blockSignals( true ); |
|
|
spinSize->setValue( mLayer->size() ); |
|
@@ -2505,6 +2506,11 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer ) |
|
|
spinAngle->setValue( mLayer->angle() ); |
|
|
spinAngle->blockSignals( false ); |
|
|
|
|
|
widgetChar->blockSignals( true ); |
|
|
widgetChar->updateFont( layerFont ); |
|
|
widgetChar->setCharacter( mLayer->character() ); |
|
|
widgetChar->blockSignals( false ); |
|
|
|
|
|
//block |
|
|
spinOffsetX->blockSignals( true ); |
|
|
spinOffsetX->setValue( mLayer->offset().x() ); |
|
|