Fix for disappearing and inaccurate buffer previews in adv labeling

This commit is contained in:
Larry Shaffer 2012-08-16 15:32:10 -06:00
parent 47f5c522a3
commit ed988051e7
2 changed files with 5 additions and 1 deletions

View File

@ -48,6 +48,10 @@ void QgsLabelPreview::paintEvent( QPaintEvent *e )
p.setFont( font() );
QFontMetrics fm( font() );
// otherwise thin buffers don't look like those on canvas
if ( mBufferSize != 0 && mBufferSize < 1 )
mBufferSize = 1;
double xtrans = 0;
if ( mBufferSize != 0 )
xtrans = mBufferSize / 4;

View File

@ -32,7 +32,7 @@ class QgsLabelPreview : public QLabel
void paintEvent( QPaintEvent* e );
private:
int mBufferSize;
double mBufferSize;
QColor mBufferColor;
Qt::PenJoinStyle mBufferJoinStyle;
bool mBufferNoFill;