File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ void CharacterWidget::updateColumns( int cols )
114
114
update ();
115
115
}
116
116
117
+ void CharacterWidget::setCharacter ( const QChar& character )
118
+ {
119
+ lastKey = character.unicode ();
120
+ update ();
121
+ }
122
+
117
123
// ! [3]
118
124
QSize CharacterWidget::sizeHint () const
119
125
{
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ class GUI_EXPORT CharacterWidget : public QWidget
76
76
void updateStyle ( const QString &fontStyle );
77
77
void updateFontMerging ( bool enable );
78
78
void updateColumns ( int cols );
79
+ void setCharacter ( const QChar& character );
79
80
80
81
signals:
81
82
void characterSelected ( const QChar &character );
Original file line number Diff line number Diff line change @@ -2491,9 +2491,10 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
2491
2491
// layer type is correct, we can do the cast
2492
2492
mLayer = static_cast <QgsFontMarkerSymbolLayerV2*>( layer );
2493
2493
2494
+ QFont layerFont ( mLayer ->fontFamily () );
2494
2495
// set values
2495
2496
cboFont->blockSignals ( true );
2496
- cboFont->setCurrentFont ( QFont ( mLayer -> fontFamily () ) );
2497
+ cboFont->setCurrentFont ( layerFont );
2497
2498
cboFont->blockSignals ( false );
2498
2499
spinSize->blockSignals ( true );
2499
2500
spinSize->setValue ( mLayer ->size () );
@@ -2505,6 +2506,11 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
2505
2506
spinAngle->setValue ( mLayer ->angle () );
2506
2507
spinAngle->blockSignals ( false );
2507
2508
2509
+ widgetChar->blockSignals ( true );
2510
+ widgetChar->updateFont ( layerFont );
2511
+ widgetChar->setCharacter ( mLayer ->character () );
2512
+ widgetChar->blockSignals ( false );
2513
+
2508
2514
// block
2509
2515
spinOffsetX->blockSignals ( true );
2510
2516
spinOffsetX->setValue ( mLayer ->offset ().x () );
You can’t perform that action at this time.
0 commit comments