Skip to content

Commit

Permalink
changes to allow vertex editing of not commited features
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5359 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 24, 2006
1 parent 8784ca4 commit bd1caa4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/gui/qgsmaptoolvertexedit.cpp
Expand Up @@ -241,7 +241,9 @@ bool QgsMapToolVertexEdit::snapVertexWithContext(QgsPoint& point)
void QgsMapToolVertexEdit::canvasReleaseEvent(QMouseEvent * e)
{
if (mSnappedAtFeatureId == -1)
return;
{
return;
}

QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer*>(mCanvas->currentLayer());

Expand Down
7 changes: 6 additions & 1 deletion src/gui/qgsvectorlayer.cpp
Expand Up @@ -896,6 +896,11 @@ void QgsVectorLayer::draw(QPainter * p, QgsRect * viewExtent, QgsMapToPixel * th
m_renderer->renderFeature(p, *it, &marker, &markerScaleFactor,
sel, widthScale);
double scale = markerScaleFactor * symbolScale;
if (mChangedGeometries.find((*it)->featureId()) != mChangedGeometries.end())
{
(*it)->setGeometry( mChangedGeometries[(*it)->featureId() ] );
}
mCachedGeometries[(*it)->featureId()] = (*it)->geometryAndOwnership();
drawFeature(p,*it,theMapToPixelTransform,&marker,scale,
projectionsEnabledFlag);
}
Expand Down Expand Up @@ -1571,7 +1576,7 @@ std::vector<QgsField> const& QgsVectorLayer::fields() const

bool QgsVectorLayer::addFeature(QgsFeature* f, bool alsoUpdateExtent)
{
static int addedIdLowWaterMark = 0;
static int addedIdLowWaterMark = -1;

if(dataProvider)
{
Expand Down

0 comments on commit bd1caa4

Please sign in to comment.