Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
etiennesky committed Jun 19, 2012
1 parent 25ee41c commit d925c7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class QgsMessageLogViewer;
class QgsScaleComboBox;

class QgsDataItem;
class QgsTileScaleWidget;

#include <QMainWindow>
#include <QToolBar>
Expand Down
21 changes: 11 additions & 10 deletions src/app/qgsdecorationgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ void QgsDecorationGrid::setMarkerSymbol( QgsMarkerSymbolV2* symbol )
void QgsDecorationGrid::projectRead()
{
QgsDecorationItem::projectRead();
mGridStyle = ( GridStyle ) QgsProject::instance()->readNumEntry( mNameConfig, "/Style", 0 );
mGridIntervalX = QgsProject::instance()->readDoubleEntry( mNameConfig, "/IntervalX", 0 );
mGridIntervalY = QgsProject::instance()->readDoubleEntry( mNameConfig, "/IntervalY", 0 );
mGridStyle = ( GridStyle ) QgsProject::instance()->readNumEntry( mNameConfig, "/Style",
QgsDecorationGrid::Solid );
mGridIntervalX = QgsProject::instance()->readDoubleEntry( mNameConfig, "/IntervalX", 10 );
mGridIntervalY = QgsProject::instance()->readDoubleEntry( mNameConfig, "/IntervalY", 10 );
mGridOffsetX = QgsProject::instance()->readDoubleEntry( mNameConfig, "/OffsetX", 0 );
mGridOffsetY = QgsProject::instance()->readDoubleEntry( mNameConfig, "/OffsetY", 0 );
// missing mGridPen, but should use styles anyway
mCrossLength = QgsProject::instance()->readDoubleEntry( mNameConfig, "/CrossLength", 0 );
mCrossLength = QgsProject::instance()->readDoubleEntry( mNameConfig, "/CrossLength", 3 );
mShowGridAnnotation = QgsProject::instance()->readBoolEntry( mNameConfig, "/ShowAnnotation", false );
mGridAnnotationPosition = ( GridAnnotationPosition ) QgsProject::instance()->readNumEntry( mNameConfig, "/AnnotationPosition", 0 );
mGridAnnotationDirection = ( GridAnnotationDirection ) QgsProject::instance()->readNumEntry( mNameConfig, "/AnnotationDirection", 0 );
Expand All @@ -104,6 +104,7 @@ void QgsDecorationGrid::projectRead()
QDomDocument doc;
QDomElement elem;
QString xml;

xml = QgsProject::instance()->readEntry( mNameConfig, "/LineSymbol" );
if ( xml != "" )
{
Expand All @@ -112,9 +113,10 @@ void QgsDecorationGrid::projectRead()
if ( mLineSymbol )
delete mLineSymbol;
mLineSymbol = dynamic_cast<QgsLineSymbolV2*>( QgsSymbolLayerV2Utils::loadSymbol( elem ) );
if ( ! mLineSymbol )
mLineSymbol = new QgsLineSymbolV2();
}
if ( ! mLineSymbol )
mLineSymbol = new QgsLineSymbolV2();

xml = QgsProject::instance()->readEntry( mNameConfig, "/MarkerSymbol" );
if ( xml != "" )
{
Expand All @@ -123,10 +125,9 @@ void QgsDecorationGrid::projectRead()
if ( mMarkerSymbol )
delete mMarkerSymbol;
mMarkerSymbol = dynamic_cast<QgsMarkerSymbolV2*>( QgsSymbolLayerV2Utils::loadSymbol( elem ) );
if ( ! mMarkerSymbol )
mMarkerSymbol = new QgsMarkerSymbolV2();
}

if ( ! mMarkerSymbol )
mMarkerSymbol = new QgsMarkerSymbolV2();
}

void QgsDecorationGrid::saveToProject()
Expand Down

0 comments on commit d925c7c

Please sign in to comment.