Skip to content
Permalink
Browse files

Fix for first part of bug #2008

git-svn-id: http://svn.osgeo.org/qgis/trunk@11820 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Oct 17, 2009
1 parent da30b63 commit d7bb27d2640608ac49956dfc1c54ff94f935311a
@@ -474,46 +474,46 @@ void QgsComposerMapWidget::on_mGridCheckBox_stateChanged( int state )
mComposerMap->update();
}

void QgsComposerMapWidget::on_mIntervalXSpinBox_valueChanged( double d )
void QgsComposerMapWidget::on_mIntervalXSpinBox_editingFinished()
{
if ( !mComposerMap )
{
return;
}
mComposerMap->setGridIntervalX( d );
mComposerMap->setGridIntervalX( mIntervalXSpinBox->value() );
mComposerMap->updateBoundingRect();
mComposerMap->update();
}

void QgsComposerMapWidget::on_mIntervalYSpinBox_valueChanged( double d )
void QgsComposerMapWidget::on_mIntervalYSpinBox_editingFinished()
{
if ( !mComposerMap )
{
return;
}
mComposerMap->setGridIntervalY( d );
mComposerMap->setGridIntervalY( mIntervalYSpinBox->value() );
mComposerMap->updateBoundingRect();
mComposerMap->update();
}

void QgsComposerMapWidget::on_mOffsetXSpinBox_valueChanged( double d )
void QgsComposerMapWidget::on_mOffsetXSpinBox_editingFinished()
{
if ( !mComposerMap )
{
return;
}
mComposerMap->setGridOffsetX( d );
mComposerMap->setGridOffsetX( mOffsetXSpinBox->value() );
mComposerMap->updateBoundingRect();
mComposerMap->update();
}

void QgsComposerMapWidget::on_mOffsetYSpinBox_valueChanged( double d )
void QgsComposerMapWidget::on_mOffsetYSpinBox_editingFinished()
{
if ( !mComposerMap )
{
return;
}
mComposerMap->setGridOffsetY( d );
mComposerMap->setGridOffsetY( mOffsetYSpinBox->value() );
mComposerMap->updateBoundingRect();
mComposerMap->update();
}
@@ -49,10 +49,10 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
void on_mYMaxLineEdit_editingFinished();

void on_mGridCheckBox_stateChanged( int state );
void on_mIntervalXSpinBox_valueChanged( double d );
void on_mIntervalYSpinBox_valueChanged( double d );
void on_mOffsetXSpinBox_valueChanged( double d );
void on_mOffsetYSpinBox_valueChanged( double d );
void on_mIntervalXSpinBox_editingFinished();
void on_mIntervalYSpinBox_editingFinished();
void on_mOffsetXSpinBox_editingFinished();
void on_mOffsetYSpinBox_editingFinished();
void on_mLineWidthSpinBox_valueChanged( double d );
void on_mLineColorButton_clicked();
void on_mGridTypeComboBox_currentIndexChanged( const QString& text );
@@ -568,7 +568,7 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
annotationElem.setAttribute( "frameDistance", mAnnotationFrameDistance );
annotationElem.setAttribute( "direction", mGridAnnotationDirection );
annotationElem.setAttribute( "font", mGridAnnotationFont.toString() );
annotationElem.setAttribute( "type", mGridAnnotationType);
annotationElem.setAttribute( "type", mGridAnnotationType );

gridElem.appendChild( annotationElem );
composerMapElem.appendChild( gridElem );
@@ -1051,7 +1051,7 @@ QgsRectangle QgsComposerMap::transformedExtent() const

double QgsComposerMap::maxExtensionXDirection() const
{
if ( mGridAnnotationPosition != OutsideMapFrame )
if ( !mGridEnabled || !mShowGridAnnotation || mGridAnnotationPosition != OutsideMapFrame )
{
return 0;
}
@@ -1090,7 +1090,7 @@ double QgsComposerMap::maxExtensionXDirection() const

double QgsComposerMap::maxExtensionYDirection() const
{
if ( mGridAnnotationPosition != OutsideMapFrame )
if ( !mGridEnabled || !mShowGridAnnotation || mGridAnnotationPosition != OutsideMapFrame )
{
return 0;
}

0 comments on commit d7bb27d

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