Skip to content

Commit

Permalink
Merge pull request #4876 from nyalldawson/upstream_ftw
Browse files Browse the repository at this point in the history
Upstream some sourcepole fork commits
  • Loading branch information
nyalldawson committed Jul 18, 2017
2 parents 9bae832 + 514e430 commit d70f53c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/main.cpp
Expand Up @@ -1034,7 +1034,7 @@ int main( int argc, char *argv[] )
}
else
{
qWarning( "loading of qgis translation failed [%s]", QStringLiteral( "%1/qgis_%2" ).arg( i18nPath, myTranslationCode ).toLocal8Bit().constData() );
QgsDebugMsg( QStringLiteral( "loading of qgis translation failed %1/qgis_%2" ).arg( i18nPath, myTranslationCode ) );
}

/* Translation file for Qt.
Expand All @@ -1048,7 +1048,7 @@ int main( int argc, char *argv[] )
}
else
{
qWarning( "loading of qt translation failed [%s]", QStringLiteral( "%1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ).toLocal8Bit().constData() );
QgsDebugMsg( QStringLiteral( "loading of qt translation failed %1/qt_%2" ).arg( QLibraryInfo::location( QLibraryInfo::TranslationsPath ), myTranslationCode ) );
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -133,6 +133,10 @@ QgsMapCanvas::QgsMapCanvas( QWidget *parent )
mResizeTimer->setSingleShot( true );
connect( mResizeTimer, &QTimer::timeout, this, &QgsMapCanvas::refresh );

mRefreshTimer = new QTimer( this );
mRefreshTimer->setSingleShot( true );
connect( mRefreshTimer, &QTimer::timeout, this, &QgsMapCanvas::refreshMap );

// create map canvas item which will show the map
mMap = new QgsMapCanvasMap( this );

Expand Down Expand Up @@ -493,7 +497,7 @@ void QgsMapCanvas::refresh()
QgsDebugMsg( "CANVAS refresh scheduling" );

// schedule a refresh
QTimer::singleShot( 1, this, SLOT( refreshMap() ) );
mRefreshTimer->start( 1 );
} // refresh

void QgsMapCanvas::refreshMap()
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -814,6 +814,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
QgsMapRendererCache *mCache = nullptr;

QTimer *mResizeTimer = nullptr;
QTimer *mRefreshTimer = nullptr;

QgsPreviewEffect *mPreviewEffect = nullptr;

Expand Down

0 comments on commit d70f53c

Please sign in to comment.