Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #1257
git-svn-id: http://svn.osgeo.org/qgis/trunk@9217 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 30, 2008
1 parent 9443ddc commit f6e43c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/grid_maker/graticulecreator.cpp
Expand Up @@ -50,7 +50,7 @@ GraticuleCreator::~GraticuleCreator()
{
}

//TODO: check for rediculous intervals!
//TODO: check for ridiculous intervals!
void GraticuleCreator::generatePointGraticule(
double theXInterval,
double theYInterval,
Expand All @@ -68,6 +68,10 @@ void GraticuleCreator::generatePointGraticule(
mFields,
QGis::WKBPoint,
&mCRS );

if( theXInterval==0.0 || theYInterval==0.0 )
return;

//
// Order our loop so that it goes from smallest to biggest
//
Expand Down
8 changes: 8 additions & 0 deletions src/plugins/grid_maker/plugingui.cpp
Expand Up @@ -56,6 +56,14 @@ void QgsGridMakerPluginGui::on_buttonBox_accepted()

double myXInterval = leXInterval->text().toDouble();
double myYInterval = leYInterval->text().toDouble();

if( myXInterval==0.0 || myYInterval==0.0 )
{
QMessageBox::warning( 0, tr( "QGIS - Grid Maker" ),
QString( tr( "Please enter intervals before pressing OK!" ) ) );
return;
}

double myXOrigin = leXLowerLeft->text().toDouble();
double myYOrigin = leYLowerLeft->text().toDouble();
double myEndPointX = leXUpperRight->text().toDouble();
Expand Down

0 comments on commit f6e43c7

Please sign in to comment.