Skip to content

Commit

Permalink
a small fix to enable the copy feature action for vector layers
Browse files Browse the repository at this point in the history
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 487f737
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/gui/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 487f737

Please sign in to comment.