Skip to content

Commit

Permalink
A simple click is enough to create auxiliary layer and display "chang…
Browse files Browse the repository at this point in the history
…e label properties" window
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 34ac1ec commit fd455f6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/app/qgsmaptoolchangelabelproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,20 @@ void QgsMapToolChangeLabelProperties::canvasPressEvent( QgsMapMouseEvent *e )
return;
}

createRubberBands();

if ( !mCurrentLabel.layer->isEditable() )
{
QgsPalIndexes indexes;
if ( createAuxiliaryFields( indexes ) )
return;
}
bool newAuxiliaryLayer = createAuxiliaryFields( indexes );

createRubberBands();
// in case of a new auxiliary layer, a dialog window is displayed and the
// canvas release event is lost.
if ( newAuxiliaryLayer )
{
canvasReleaseEvent( e );
}
}
}

void QgsMapToolChangeLabelProperties::canvasReleaseEvent( QgsMapMouseEvent *e )
Expand Down

0 comments on commit fd455f6

Please sign in to comment.