Skip to content
Permalink
Browse files

fix crash on toggle editing

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12075 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 10, 2009
1 parent 45cf550 commit 80ecf23719c58b5e4c1c320cbed302c8949ca2a4
Showing with 13 additions and 7 deletions.
  1. +10 −6 src/app/qgisapp.cpp
  2. +3 −1 src/app/qgisapp.h
@@ -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" ) );
@@ -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 );
@@ -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 );
@@ -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 ) )
@@ -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;
@@ -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;

0 comments on commit 80ecf23

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