Skip to content
Permalink
Browse files
No lambda
  • Loading branch information
m-kuhn committed Jul 13, 2021
1 parent da301af commit 7ddb06e66c572ee96f131c6e9073c52ddfaabe24
Showing with 4 additions and 10 deletions.
  1. +2 −8 src/gui/qgsmapcanvas.cpp
  2. +2 −2 src/gui/qgsmapcanvas.h
@@ -219,17 +219,11 @@ QgsMapCanvas::QgsMapCanvas( QWidget *parent )
connect( window()->windowHandle(), &QWindow::screenChanged, this, [ = ]( QScreen * )
{
disconnect( mScreenDpiChangedConnection );
mScreenDpiChangedConnection = connect( window()->windowHandle()->screen(), &QScreen::physicalDotsPerInchChanged, this, [ = ]( qreal )
{
updateDevicePixelFromScreen();
} );
mScreenDpiChangedConnection = connect( window()->windowHandle()->screen(), &QScreen::physicalDotsPerInchChanged, this, &QgsMapCanvas::updateDevicePixelFromScreen );
updateDevicePixelFromScreen();
} );

mScreenDpiChangedConnection = connect( window()->windowHandle()->screen(), &QScreen::physicalDotsPerInchChanged, this, [ = ]( qreal )
{
updateDevicePixelFromScreen();
} );
mScreenDpiChangedConnection = connect( window()->windowHandle()->screen(), &QScreen::physicalDotsPerInchChanged, this, &QgsMapCanvas::updateDevicePixelFromScreen );
}

connect( &mMapUpdateTimer, &QTimer::timeout, this, &QgsMapCanvas::mapUpdateTimeout );
@@ -981,6 +981,8 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsExpressionContex
//! Renames the active map theme called \a theme to \a newTheme
void mapThemeRenamed( const QString &theme, const QString &newTheme );

void updateDevicePixelFromScreen();

signals:

/**
@@ -1430,8 +1432,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsExpressionContex

void showContextMenu( QgsMapMouseEvent *event );

void updateDevicePixelFromScreen();

friend class TestQgsMapCanvas;

}; // class QgsMapCanvas

0 comments on commit 7ddb06e

Please sign in to comment.