Skip to content

Commit f6e43c7

Browse files
author
jef
committedAug 30, 2008
fix #1257
git-svn-id: http://svn.osgeo.org/qgis/trunk@9217 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9443ddc commit f6e43c7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
 

‎src/plugins/grid_maker/graticulecreator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ GraticuleCreator::~GraticuleCreator()
5050
{
5151
}
5252

53-
//TODO: check for rediculous intervals!
53+
//TODO: check for ridiculous intervals!
5454
void GraticuleCreator::generatePointGraticule(
5555
double theXInterval,
5656
double theYInterval,
@@ -68,6 +68,10 @@ void GraticuleCreator::generatePointGraticule(
6868
mFields,
6969
QGis::WKBPoint,
7070
&mCRS );
71+
72+
if( theXInterval==0.0 || theYInterval==0.0 )
73+
return;
74+
7175
//
7276
// Order our loop so that it goes from smallest to biggest
7377
//

‎src/plugins/grid_maker/plugingui.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ void QgsGridMakerPluginGui::on_buttonBox_accepted()
5656

5757
double myXInterval = leXInterval->text().toDouble();
5858
double myYInterval = leYInterval->text().toDouble();
59+
60+
if( myXInterval==0.0 || myYInterval==0.0 )
61+
{
62+
QMessageBox::warning( 0, tr( "QGIS - Grid Maker" ),
63+
QString( tr( "Please enter intervals before pressing OK!" ) ) );
64+
return;
65+
}
66+
5967
double myXOrigin = leXLowerLeft->text().toDouble();
6068
double myYOrigin = leYLowerLeft->text().toDouble();
6169
double myEndPointX = leXUpperRight->text().toDouble();

0 commit comments

Comments
 (0)
Please sign in to comment.