Skip to content

Commit

Permalink
Fix #11169 (toggling symbol visibility does not trigger refresh)
Browse files Browse the repository at this point in the history
This could have happened when the same project was reloaded, then map canvas
failed to clear itself and some connections to repaintRequested were broken
  • Loading branch information
wonder-sk committed Sep 10, 2014
1 parent edd64c4 commit e96ff4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/qgisapp.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ void QgisApp::initLayerTreeView()
// visibility groups tool button // visibility groups tool button
QToolButton* btnVisibilityGroups = new QToolButton; QToolButton* btnVisibilityGroups = new QToolButton;
btnVisibilityGroups->setAutoRaise( true ); btnVisibilityGroups->setAutoRaise( true );
btnVisibilityGroups->setToolTip( tr( "Manage Layer Visibility") ); btnVisibilityGroups->setToolTip( tr( "Manage Layer Visibility" ) );
btnVisibilityGroups->setIcon( QgsApplication::getThemeIcon( "/mActionShowAllLayers.png" ) ); btnVisibilityGroups->setIcon( QgsApplication::getThemeIcon( "/mActionShowAllLayers.png" ) );
btnVisibilityGroups->setPopupMode( QToolButton::InstantPopup ); btnVisibilityGroups->setPopupMode( QToolButton::InstantPopup );
btnVisibilityGroups->setMenu( QgsVisibilityGroups::instance()->menu() ); btnVisibilityGroups->setMenu( QgsVisibilityGroups::instance()->menu() );
Expand Down Expand Up @@ -7848,6 +7848,9 @@ void QgisApp::closeProject()
removeAnnotationItems(); removeAnnotationItems();
// clear out any stuff from project // clear out any stuff from project
mMapCanvas->freeze( true ); mMapCanvas->freeze( true );
QList<QgsMapCanvasLayer> emptyList;
mMapCanvas->setLayerSet( emptyList );
mMapCanvas->clearCache();
removeAllLayers(); removeAllLayers();
} }


Expand Down

0 comments on commit e96ff4a

Please sign in to comment.