Skip to content
Permalink
Browse files
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 8927a3d4bb11faf97bb31ac43c6b49d6e6dca924
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/app/qgsmaptoolrotatefeature.cpp
@@ -89,6 +89,13 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )
QgsVectorLayer* vlayer = currentVectorLayer();
if ( !vlayer )
{
notifyNotVectorLayer();
return;
}

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

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

void QgsMapToolRotateFeature::canvasReleaseEvent( QMouseEvent * e )
{
Q_UNUSED( e );
if ( !mRubberBand )
{
return;
@@ -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;
}

0 comments on commit 8927a3d

Please sign in to comment.