Skip to content

Commit

Permalink
Fix for disappearing and inaccurate buffer previews in adv labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Aug 16, 2012
1 parent 47f5c52 commit ed98805
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/qgslabelpreview.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgslabelpreview.h
Expand Up @@ -32,7 +32,7 @@ class QgsLabelPreview : public QLabel
void paintEvent( QPaintEvent* e );

private:
int mBufferSize;
double mBufferSize;
QColor mBufferColor;
Qt::PenJoinStyle mBufferJoinStyle;
bool mBufferNoFill;
Expand Down

0 comments on commit ed98805

Please sign in to comment.