Skip to content
Permalink
Browse files
a small fix to enable the copy feature action for vector layers
git-svn-id: http://svn.osgeo.org/qgis/trunk@5490 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 26, 2006
1 parent 75d9c89 commit 487f737f24e8071f3ec7aa15123aae3785793621
Showing with 6 additions and 5 deletions.
  1. +4 −3 src/gui/qgisapp.cpp
  2. +2 −2 src/gui/qgsvectorlayer.cpp
@@ -639,15 +639,15 @@ void QgisApp::createActions()
mActionMoveVertex->setStatusTip(tr("Move Vertex"));
connect(mActionMoveVertex, SIGNAL(triggered()), this, SLOT(moveVertex()));

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

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

mActionEditPaste = new QAction(QIcon(myIconPath+"/mActionEditPaste.png"), tr("paste features"), this);
mActionEditPaste = new QAction(QIcon(myIconPath+"/mActionEditPaste.png"), tr("Paste Features"), this);
mActionEditPaste->setStatusTip(tr("Paste selected features"));
connect(mActionEditPaste, SIGNAL(triggered()), this, SLOT(editPaste()));
}
@@ -4639,6 +4639,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(const QgsMapLayer* layer)
mActionSelect->setEnabled(true);
mActionOpenTable->setEnabled(true);
mActionIdentify->setEnabled(true);
mActionEditCopy->setEnabled(true);

const QgsVectorLayer* vlayer = dynamic_cast<const QgsVectorLayer*>(layer);
const QgsVectorDataProvider* dprovider = vlayer->getDataProvider();
@@ -925,7 +925,7 @@ void QgsVectorLayer::cacheGeometries()
QgsFeature* f = 0;
while(f = dataProvider->getNextFeature(false))
{
mCachedGeometries.insert(std::make_pair(f->featureId(), f->geometryAndOwnership()));
//mCachedGeometries.insert(std::make_pair(f->featureId(), f->geometryAndOwnership()));
delete f;
}
}
@@ -1593,7 +1593,7 @@ bool QgsVectorLayer::addFeature(QgsFeature* f, bool alsoUpdateExtent)
if(!isEditable())
{
QMessageBox::information(0, tr("Layer not editable"),
tr("The current layer is not editable. Choose 'Allow editing' in the legend item right click menu."));
tr("The current layer is not editable. Choose 'Start editing' in the digitizing toolbar."));
return false;
}

0 comments on commit 487f737

Please sign in to comment.