Skip to content
Permalink
Browse files
disabled all vector layer related actions at startup (editing, table,…
… select). This should fix ticket 271

git-svn-id: http://svn.osgeo.org/qgis/trunk@5833 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 18, 2006
1 parent d6d5a76 commit ece1394e72cf8698e4b833822665acd4c2acd682
Showing with 16 additions and 0 deletions.
  1. +12 −0 src/gui/qgisapp.cpp
  2. +4 −0 src/gui/qgsmaptoolvertexedit.cpp
@@ -554,11 +554,13 @@ void QgisApp::createActions()
mActionSelect= new QAction(QIcon(myIconPath+"/mActionSelect.png"), tr("Select Features"), this);
mActionSelect->setStatusTip(tr("Select Features"));
connect(mActionSelect, SIGNAL(triggered()), this, SLOT(select()));
mActionSelect->setEnabled(false);
//
mActionOpenTable= new QAction(QIcon(myIconPath+"/mActionOpenTable.png"), tr("Open Table"), this);
//mActionOpenTable->setShortcut(tr("Ctrl+O","Open Table"));
mActionOpenTable->setStatusTip(tr("Open Table"));
connect(mActionOpenTable, SIGNAL(triggered()), this, SLOT(attributeTable()));
mActionOpenTable->setEnabled(false);
//
mActionMeasure= new QAction(QIcon(myIconPath+"/mActionMeasure.png"), tr("Measure Line "), this);
mActionMeasure->setShortcut(tr("Ctrl+M","Measure a Line"));
@@ -617,44 +619,54 @@ void QgisApp::createActions()
mActionCapturePoint->setShortcut(tr(".","Capture Points"));
mActionCapturePoint->setStatusTip(tr("Capture Points"));
connect(mActionCapturePoint, SIGNAL(triggered()), this, SLOT(capturePoint()));
mActionCapturePoint->setEnabled(false);
//
mActionCaptureLine= new QAction(QIcon(myIconPath+"/mActionCaptureLine.png"), tr("Capture Line"), this);
mActionCaptureLine->setShortcut(tr("/","Capture Lines"));
mActionCaptureLine->setStatusTip(tr("Capture Lines"));
connect(mActionCaptureLine, SIGNAL(triggered()), this, SLOT(captureLine()));
mActionCaptureLine->setEnabled(false);
//
mActionCapturePolygon= new QAction(QIcon(myIconPath+"/mActionCapturePolygon.png"), tr("Capture Polygon"), this);
mActionCapturePolygon->setShortcut(tr("Ctrl+/","Capture Polygons"));
mActionCapturePolygon->setStatusTip(tr("Capture Polygons"));
connect(mActionCapturePolygon, SIGNAL(triggered()), this, SLOT(capturePolygon()));
mActionCapturePolygon->setEnabled(false);
//
mActionDeleteSelected = new QAction(QIcon(myIconPath+"/mActionDeleteSelected.png"), tr("Delete Seleced"), this);
mActionDeleteSelected->setStatusTip(tr("Delete Selected"));
connect(mActionDeleteSelected, SIGNAL(triggered()), this, SLOT(deleteSelected()));
mActionDeleteSelected->setEnabled(false);
//
mActionAddVertex = new QAction(QIcon(myIconPath+"/mActionAddVertex.png"), tr("Add Vertex"), this);
mActionAddVertex->setStatusTip(tr("Add Vertex"));
connect(mActionAddVertex, SIGNAL(triggered()), this, SLOT(addVertex()));
mActionAddVertex->setEnabled(false);
//
mActionDeleteVertex = new QAction(QIcon(myIconPath+"/mActionDeleteVertex.png"), tr("Delete Vertex"), this);
mActionDeleteVertex->setStatusTip(tr("Delete Vertex"));
connect(mActionDeleteVertex, SIGNAL(triggered()), this, SLOT(deleteVertex()));
mActionDeleteVertex->setEnabled(false);
//
mActionMoveVertex = new QAction(QIcon(myIconPath+"/mActionMoveVertex.png"), tr("Move Vertex"), this);
mActionMoveVertex->setStatusTip(tr("Move Vertex"));
connect(mActionMoveVertex, SIGNAL(triggered()), this, SLOT(moveVertex()));
mActionMoveVertex->setEnabled(false);

mActionEditCut = new QAction(QIcon(myIconPath+"/mActionEditCut.png"), tr("Cut Features"), this);
mActionEditCut->setStatusTip(tr("Cut selected features"));
connect(mActionEditCut, SIGNAL(triggered()), this, SLOT(editCut()));
mActionEditCut->setEnabled(false);

mActionEditCopy = new QAction(QIcon(myIconPath+"/mActionEditCopy.png"), tr("Copy Features"), this);
mActionEditCopy->setStatusTip(tr("Copy selected features"));
connect(mActionEditCopy, SIGNAL(triggered()), this, SLOT(editCopy()));
mActionEditCopy->setEnabled(false);

mActionEditPaste = new QAction(QIcon(myIconPath+"/mActionEditPaste.png"), tr("Paste Features"), this);
mActionEditPaste->setStatusTip(tr("Paste selected features"));
connect(mActionEditPaste, SIGNAL(triggered()), this, SLOT(editPaste()));
mActionEditPaste->setEnabled(false);
}

void QgisApp::createActionGroups()
@@ -151,6 +151,10 @@ void QgsMapToolVertexEdit::canvasPressEvent(QMouseEvent * e)

snapPoint = point;
QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer*>(mCanvas->currentLayer());
if(!vlayer)
{
return;
}
if(vlayer->vectorType() == QGis::Point)//snap to point for point/multipoint layers
{
if(!snapVertexWithContext(snapPoint))

0 comments on commit ece1394

Please sign in to comment.