Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update 'not vector/editable layer' dialogs to message bar for new Rot…
…ate map tool
  • Loading branch information
dakcarto committed Jan 12, 2013
1 parent 2c36e7d commit 8927a3d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/qgsmaptoolrotatefeature.cpp
Expand Up @@ -89,6 +89,13 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )
QgsVectorLayer* vlayer = currentVectorLayer();
if ( !vlayer )
{
notifyNotVectorLayer();
return;
}

if ( !vlayer->isEditable() )
{
notifyNotEditableLayer();
return;
}

Expand Down Expand Up @@ -170,6 +177,7 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )

void QgsMapToolRotateFeature::canvasReleaseEvent( QMouseEvent * e )
{
Q_UNUSED( e );
if ( !mRubberBand )
{
return;
Expand Down Expand Up @@ -301,9 +309,6 @@ void QgsMapToolRotateFeature::activate()

if ( !vlayer->isEditable() )
{
QMessageBox::information( 0, tr( "Layer not editable" ),
tr( "Cannot edit the vector layer. Use 'Toggle Editing' to make it editable." )
);
return;
}

Expand Down

0 comments on commit 8927a3d

Please sign in to comment.