Skip to content

Commit

Permalink
Fix rebase problems
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and jef-n committed Mar 27, 2013
1 parent d6d5da4 commit bb360b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
}

Expand Down
6 changes: 3 additions & 3 deletions src/gui/attributetable/qgsattributetablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 ) );
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/gui/attributetable/qgsfeaturelistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <QVariant>
#include <QItemSelectionModel>

#include "qgsfeature.h" // QgsFeatureId

class QgsAttributeTableFilterModel;
class QgsAttributeTableModel;
class QgsVectorLayerCache;
Expand Down

0 comments on commit bb360b8

Please sign in to comment.