Skip to content

Commit 5590ab4

Browse files
committed
Do not block functionality when canvas is drawing, respect frozen/render on flag.
Because the rendering is asynchronous, it is not necessary to block user input anymore
1 parent 6ee8a7e commit 5590ab4

9 files changed

+16
-254
lines changed

src/app/legend/qgslegend.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ void QgsLegend::removeAll()
296296

297297
void QgsLegend::setLayersVisible( bool visible )
298298
{
299-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
299+
if ( !mMapCanvas )
300300
{
301301
return;
302302
}
@@ -780,7 +780,7 @@ void QgsLegend::mouseDoubleClickEvent( QMouseEvent *e )
780780

781781
void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& position )
782782
{
783-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
783+
if ( !mMapCanvas )
784784
{
785785
return;
786786
}
@@ -1079,7 +1079,7 @@ int QgsLegend::getItemPos( QTreeWidgetItem* item )
10791079
void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
10801080
{
10811081
QgsDebugMsg( "Entering." );
1082-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1082+
if ( !mMapCanvas )
10831083
{
10841084
return;
10851085
}
@@ -1551,7 +1551,7 @@ bool QgsLegend::setCurrentLayer( QgsMapLayer *layer )
15511551

15521552
void QgsLegend::legendGroupRemove()
15531553
{
1554-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1554+
if ( !mMapCanvas )
15551555
{
15561556
return;
15571557
}
@@ -1571,7 +1571,7 @@ void QgsLegend::legendGroupRemove()
15711571

15721572
void QgsLegend::legendGroupSetCRS()
15731573
{
1574-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1574+
if ( !mMapCanvas )
15751575
{
15761576
return;
15771577
}
@@ -1595,7 +1595,7 @@ void QgsLegend::legendGroupSetCRS()
15951595

15961596
void QgsLegend::removeGroup( QgsLegendGroup *lg )
15971597
{
1598-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1598+
if ( !mMapCanvas )
15991599
{
16001600
return;
16011601
}
@@ -1625,7 +1625,7 @@ void QgsLegend::removeGroup( QgsLegendGroup *lg )
16251625

16261626
void QgsLegend::setGroupCRS( QgsLegendGroup *lg, const QgsCoordinateReferenceSystem &crs )
16271627
{
1628-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1628+
if ( !mMapCanvas )
16291629
{
16301630
return;
16311631
}
@@ -1680,7 +1680,7 @@ void QgsLegend::moveLayer( QgsMapLayer *ml, int groupIndex )
16801680

16811681
void QgsLegend::legendLayerShowInOverview()
16821682
{
1683-
if ( !mMapCanvas || mMapCanvas->isDrawing() )
1683+
if ( !mMapCanvas )
16841684
{
16851685
return;
16861686
}

0 commit comments

Comments
 (0)