Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix crash on toggle editing
git-svn-id: http://svn.osgeo.org/qgis/trunk@12075 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 10, 2009
1 parent 6eb55cc commit 9640358
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/app/qgisapp.cpp
Expand Up @@ -695,7 +695,7 @@ void QgisApp::createActions()
mActionDeleteSelected->setEnabled( false );

//these three tools to be deprecated - use node tool rather
/**
#if 0
mActionAddVertex = new QAction( getThemeIcon( "mActionAddVertex.png" ), tr( "Add Vertex" ), this );
shortcuts->registerAction( mActionAddVertex );
mActionAddVertex->setStatusTip( tr( "Add Vertex" ) );
Expand All @@ -713,7 +713,7 @@ void QgisApp::createActions()
mActionDeleteVertex->setStatusTip( tr( "Delete Vertex" ) );
connect( mActionDeleteVertex, SIGNAL( triggered() ), this, SLOT( deleteVertex() ) );
mActionDeleteVertex->setEnabled( false );
*/
#endif

mActionAddRing = new QAction( getThemeIcon( "mActionAddRing.png" ), tr( "Add Ring" ), this );
shortcuts->registerAction( mActionAddRing );
Expand Down Expand Up @@ -5728,10 +5728,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionCapturePolygon->setEnabled( false );
mActionCaptureLine->setVisible( false );
mActionCapturePolygon->setVisible( false );
//these three tools to be deprecated - use node tool rather
//mActionAddVertex->setEnabled( false );
//mActionDeleteVertex->setEnabled( false );
//mActionMoveVertex->setEnabled( false );
#if 0 //these three tools to be deprecated - use node tool rather
mActionAddVertex->setEnabled( false );
mActionDeleteVertex->setEnabled( false );
mActionMoveVertex->setEnabled( false );
#endif
mActionAddRing->setEnabled( false );
mActionAddIsland->setEnabled( false );
mActionReshapeFeatures->setEnabled( false );
Expand All @@ -5740,10 +5741,13 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionDeleteRing->setEnabled( false );
mActionRotatePointSymbols->setEnabled( false );

#if 0
if ( vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::ChangeGeometries )
{
mActionMoveVertex->setEnabled( true );
}
#endif

if ( vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::ChangeAttributeValues )
{
if ( QgsMapToolRotatePointSymbols::layerIsRotatable( vlayer ) )
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgisapp.h
Expand Up @@ -744,9 +744,11 @@ class QgisApp : public QMainWindow
QAction *mActionMoveFeature;
QAction *mActionReshapeFeatures;
QAction *mActionSplitFeatures;
#if 0 // deprecated
QAction *mActionAddVertex;
QAction *mActionDeleteVertex;
QAction *mActionMoveVertex;
#endif
QAction *mActionAddRing;
QAction *mActionAddIsland;
QAction *mActionEditSeparator2;
Expand Down Expand Up @@ -974,7 +976,7 @@ class QgisApp : public QMainWindow

/* Maptip object
*/
QgsMapTip * mpMaptip;
QgsMapTip *mpMaptip;

// Flag to indicate if maptips are on or off
bool mMapTipsVisible;
Expand Down

0 comments on commit 9640358

Please sign in to comment.