Skip to content
Permalink
Browse files

Fix a crash when toggling a layer to editable mode

  • Loading branch information
wonder-sk committed Jun 8, 2017
1 parent c340e37 commit bdd81685a1a270775a2db9ea43f552a13b8f294d
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgsmaptoollabel.cpp
@@ -469,7 +469,7 @@ bool QgsMapToolLabel::currentLabelDataDefinedPosition( double &x, bool &xSuccess

bool QgsMapToolLabel::layerIsRotatable( QgsVectorLayer *vlayer, int &rotationCol ) const
{
if ( !vlayer || !vlayer->isEditable() )
if ( !vlayer || !vlayer->isEditable() || !vlayer->labeling() )
{
return false;
}
@@ -590,7 +590,7 @@ bool QgsMapToolLabel::diagramMoveable( QgsVectorLayer *vlayer, int &xCol, int &y

bool QgsMapToolLabel::labelMoveable( QgsVectorLayer *vlayer, int &xCol, int &yCol ) const
{
if ( !vlayer || !vlayer->isEditable() )
if ( !vlayer || !vlayer->isEditable() || !vlayer->labeling() )
{
return false;
}
@@ -623,7 +623,7 @@ bool QgsMapToolLabel::layerCanPin( QgsVectorLayer *vlayer, int &xCol, int &yCol

bool QgsMapToolLabel::labelCanShowHide( QgsVectorLayer *vlayer, int &showCol ) const
{
if ( !vlayer || !vlayer->isEditable() )
if ( !vlayer || !vlayer->isEditable() || !vlayer->labeling() )
{
return false;
}

0 comments on commit bdd8168

Please sign in to comment.
You can’t perform that action at this time.