Skip to content

Commit

Permalink
revert unnecessary api change
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 28, 2013
1 parent fc0b28c commit 93c5599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -803,11 +803,10 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,

// enabling transaction on databases that support it
bool transactionsEnabled = true;
OGRLayerH ogrCurrentLayer = writer->getLayer();

if ( OGRERR_NONE != OGR_L_StartTransaction(ogrCurrentLayer) )
if ( OGRERR_NONE != OGR_L_StartTransaction( writer->mLayer ) )
{
QgsDebugMsg("Error when trying to enable transactions on OGRLayer.");
QgsDebugMsg( "Error when trying to enable transactions on OGRLayer." );
transactionsEnabled = false;
}

Expand Down Expand Up @@ -874,9 +873,9 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,

if ( transactionsEnabled )
{
if ( OGRERR_NONE != OGR_L_CommitTransaction(ogrCurrentLayer) )
if ( OGRERR_NONE != OGR_L_CommitTransaction( writer->mLayer ) )
{
QgsDebugMsg("Error while commiting transaction on OGRLayer.");
QgsDebugMsg( "Error while commiting transaction on OGRLayer." );
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/core/qgsvectorfilewriter.h
Expand Up @@ -154,9 +154,6 @@ class CORE_EXPORT QgsVectorFileWriter

double symbologyScaleDenominator() const { return mSymbologyScaleDenominator; }
void setSymbologyScaleDenominator( double d ) { mSymbologyScaleDenominator = d; }

/**Returns OGRLayer used to begin and commit transactions on database*/
OGRLayerH getLayer() { return mLayer; }

protected:
//! @note not available in python bindings
Expand Down

0 comments on commit 93c5599

Please sign in to comment.