Skip to content
Permalink
Browse files

Fix rebase problems

  • Loading branch information
m-kuhn authored and jef-n committed Mar 27, 2013
1 parent d6d5da4 commit bb360b81148df4dcac68cc1179dfc2abaa682c7b
@@ -30,6 +30,7 @@
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsmapcanvas.h"
#include "qgsproject.h"
#include "qgslegend.h"
#include "qgsshortcutsmanager.h"
#include "qgsattributedialog.h"
@@ -535,7 +536,13 @@ bool QgisAppInterface::openFeatureForm( QgsVectorLayer *vlayer, QgsFeature &f, b

QDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &f )
{
QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &f, false );
QgsDistanceArea myDa;

myDa.setSourceCrs( l->crs().srsid() );
myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() );
myDa.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", GEO_NONE ) );

QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &f, false, myDa );
return dialog->dialog();
}

@@ -431,7 +431,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
return role == Qt::DisplayRole ? rowId : QVariant();

int fieldId = mAttributes[ index.column()];
const QgsField& field = mLayer->pendingFields()[ fieldId ];
const QgsField& field = layer()->pendingFields()[ fieldId ];

QVariant::Type fldType = field.type();
bool fldNumeric = ( fldType == QVariant::Int || fldType == QVariant::Double );
@@ -477,9 +477,9 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
return mValueMaps[ fieldId ]->key( val.toString(), QString( "(%1)" ).arg( val.toString() ) );
}

if ( mLayer->editType( fieldId ) == QgsVectorLayer::Calendar && val.canConvert( QVariant::Date ) )
if ( layer()->editType( fieldId ) == QgsVectorLayer::Calendar && val.canConvert( QVariant::Date ) )
{
return val.toDate().toString( mLayer->dateFormat( fieldId ) );
return val.toDate().toString( layer()->dateFormat( fieldId ) );
}
}

@@ -7,6 +7,8 @@
#include <QVariant>
#include <QItemSelectionModel>

#include "qgsfeature.h" // QgsFeatureId

class QgsAttributeTableFilterModel;
class QgsAttributeTableModel;
class QgsVectorLayerCache;

0 comments on commit bb360b8

Please sign in to comment.
You can’t perform that action at this time.