Ignore:
Timestamp:
Mar 19, 2021, 9:15:03 AM (3 years ago)
Author:
stoecker
Message:

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_abstract_scale_draw.cpp

    r8127 r9383  
    2626        minExtent( 0.0 )
    2727    {
    28         components = QwtAbstractScaleDraw::Backbone 
    29             | QwtAbstractScaleDraw::Ticks 
     28        components = QwtAbstractScaleDraw::Backbone
     29            | QwtAbstractScaleDraw::Ticks
    3030            | QwtAbstractScaleDraw::Labels;
    3131
     
    198198        painter->save();
    199199
    200         QPen pen = painter->pen();
     200        pen = painter->pen();
    201201        pen.setColor( palette.color( QPalette::WindowText ) );
    202202        pen.setCapStyle( Qt::FlatCap );
     
    227227        painter->save();
    228228
    229         QPen pen = painter->pen();
     229        pen = painter->pen();
    230230        pen.setColor( palette.color( QPalette::WindowText ) );
    231231        pen.setCapStyle( Qt::FlatCap );
     
    393393    const QFont &font, double value ) const
    394394{
    395     QMap<double, QwtText>::const_iterator it = d_data->labelCache.find( value );
    396     if ( it == d_data->labelCache.end() )
    397     {
    398         QwtText lbl = label( value );
    399         lbl.setRenderFlags( 0 );
    400         lbl.setLayoutAttribute( QwtText::MinimumLayout );
    401 
    402         ( void )lbl.textSize( font ); // initialize the internal cache
    403 
    404         it = d_data->labelCache.insert( value, lbl );
    405     }
    406 
    407     return ( *it );
     395    QMap<double, QwtText>::const_iterator it1 = d_data->labelCache.constFind( value );
     396    if ( it1 != d_data->labelCache.constEnd() )
     397        return *it1;
     398
     399    QwtText lbl = label( value );
     400    lbl.setRenderFlags( 0 );
     401    lbl.setLayoutAttribute( QwtText::MinimumLayout );
     402
     403    ( void )lbl.textSize( font ); // initialize the internal cache
     404
     405    QMap<double, QwtText>::iterator it2 = d_data->labelCache.insert( value, lbl );
     406    return *it2;
    408407}
    409408
Note: See TracChangeset for help on using the changeset viewer.