Skip to content

Commit

Permalink
Do not block functionality when canvas is drawing, respect frozen/ren…
Browse files Browse the repository at this point in the history
…der on flag.

Because the rendering is asynchronous, it is not necessary to block user input anymore
  • Loading branch information
wonder-sk committed Nov 27, 2013
1 parent 6ee8a7e commit 5590ab4
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 254 deletions.
16 changes: 8 additions & 8 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -296,7 +296,7 @@ void QgsLegend::removeAll()

void QgsLegend::setLayersVisible( bool visible )
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down Expand Up @@ -780,7 +780,7 @@ void QgsLegend::mouseDoubleClickEvent( QMouseEvent *e )

void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& position )
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down Expand Up @@ -1079,7 +1079,7 @@ int QgsLegend::getItemPos( QTreeWidgetItem* item )
void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
{
QgsDebugMsg( "Entering." );
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down Expand Up @@ -1551,7 +1551,7 @@ bool QgsLegend::setCurrentLayer( QgsMapLayer *layer )

void QgsLegend::legendGroupRemove()
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand All @@ -1571,7 +1571,7 @@ void QgsLegend::legendGroupRemove()

void QgsLegend::legendGroupSetCRS()
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand All @@ -1595,7 +1595,7 @@ void QgsLegend::legendGroupSetCRS()

void QgsLegend::removeGroup( QgsLegendGroup *lg )
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down Expand Up @@ -1625,7 +1625,7 @@ void QgsLegend::removeGroup( QgsLegendGroup *lg )

void QgsLegend::setGroupCRS( QgsLegendGroup *lg, const QgsCoordinateReferenceSystem &crs )
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down Expand Up @@ -1680,7 +1680,7 @@ void QgsLegend::moveLayer( QgsMapLayer *ml, int groupIndex )

void QgsLegend::legendLayerShowInOverview()
{
if ( !mMapCanvas || mMapCanvas->isDrawing() )
if ( !mMapCanvas )
{
return;
}
Expand Down

0 comments on commit 5590ab4

Please sign in to comment.