Skip to content

Commit

Permalink
- Fix build.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20393 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed May 6, 2014
1 parent bb38907 commit cb3c7e8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions OMPlot/OMPlotGUI/ScaleDraw.cpp
Expand Up @@ -50,11 +50,16 @@ ScaleDraw::ScaleDraw()

void ScaleDraw::drawBackbone( QPainter *painter ) const
{
#if QWT_VERSION >= 0x060000
const bool doAlign = QwtPainter::roundingAlignment( painter );
const int pw = qMax( penWidth(), 1 );
#else
const bool doAlign = true;
const int pw = 1;
#endif

const QPointF &position = pos();
const double len = length();
const int pw = qMax( penWidth(), 1 );

// pos indicates a border not the center of the backbone line
// so we need to shift its position depending on the pen width
Expand Down Expand Up @@ -118,16 +123,20 @@ void ScaleDraw::drawTick( QPainter *painter, double value, double len ) const
{
if ( len <= 0 )
return;

#if QWT_VERSION >= 0x060000
const bool roundingAlignment = QwtPainter::roundingAlignment( painter );
const int pw = penWidth();
#else
const bool roundingAlignment = true;
const int pw = 1;
#endif

QPointF position = pos();

double tval = scaleMap().transform( value );
if ( roundingAlignment )
tval = qRound( tval );

const int pw = penWidth();
int a = 0;
if ( pw > 1 && roundingAlignment )
a = 1;
Expand Down

0 comments on commit cb3c7e8

Please sign in to comment.