mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix for disappearing and inaccurate buffer previews in adv labeling
This commit is contained in:
parent
47f5c522a3
commit
ed988051e7
@ -48,6 +48,10 @@ void QgsLabelPreview::paintEvent( QPaintEvent *e )
|
|||||||
p.setFont( font() );
|
p.setFont( font() );
|
||||||
QFontMetrics fm( font() );
|
QFontMetrics fm( font() );
|
||||||
|
|
||||||
|
// otherwise thin buffers don't look like those on canvas
|
||||||
|
if ( mBufferSize != 0 && mBufferSize < 1 )
|
||||||
|
mBufferSize = 1;
|
||||||
|
|
||||||
double xtrans = 0;
|
double xtrans = 0;
|
||||||
if ( mBufferSize != 0 )
|
if ( mBufferSize != 0 )
|
||||||
xtrans = mBufferSize / 4;
|
xtrans = mBufferSize / 4;
|
||||||
|
@ -32,7 +32,7 @@ class QgsLabelPreview : public QLabel
|
|||||||
void paintEvent( QPaintEvent* e );
|
void paintEvent( QPaintEvent* e );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int mBufferSize;
|
double mBufferSize;
|
||||||
QColor mBufferColor;
|
QColor mBufferColor;
|
||||||
Qt::PenJoinStyle mBufferJoinStyle;
|
Qt::PenJoinStyle mBufferJoinStyle;
|
||||||
bool mBufferNoFill;
|
bool mBufferNoFill;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user