Skip to content

Commit 7343b61

Browse files
author
g_j_m
committed
Fix for part of ticket #247 (unable to create a custom projection)
Also move some debugging output to QgsLogger git-svn-id: http://svn.osgeo.org/qgis/trunk@5778 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 69d99b1 commit 7343b61

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/gui/qgscustomprojectiondialog.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//qgis includes
1515
#include "qgis.h" //<--magick numbers
1616
#include "qgsapplication.h"
17+
#include "qgslogger.h"
1718

1819
//qt includes
19-
#include <QDir>
2020
#include <QFileInfo>
2121
#include <QMessageBox>
2222

@@ -61,7 +61,10 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog(QWidget *parent, Qt::WFlags
6161
//getProjList();
6262
//getEllipsoidList();
6363
mRecordCountLong=getRecordCount();
64-
on_pbnFirst_clicked();
64+
if (mRecordCountLong > 0)
65+
on_pbnFirst_clicked();
66+
else
67+
on_pbnNew_clicked();
6568
}
6669

6770
QgsCustomProjectionDialog::~QgsCustomProjectionDialog()
@@ -982,7 +985,7 @@ void QgsCustomProjectionDialog::cboProjectionFamily_highlighted( const QString &
982985

983986
QString QgsCustomProjectionDialog::getProjFromParameters()
984987
{
985-
std::cout << "QgsCustomProjectionDialog::getProjFromParameters()" << std::endl;
988+
QgsLogger::debug("QgsCustomProjectionDialog::getProjFromParameters()");
986989
QString myProj4String = leParameters->text();
987990
QRegExp myProjRegExp( "\\+proj=[a-zA-Z]*" );
988991
int myStart= 0;
@@ -1002,7 +1005,7 @@ QString QgsCustomProjectionDialog::getProjFromParameters()
10021005

10031006
QString QgsCustomProjectionDialog::getEllipseFromParameters()
10041007
{
1005-
std::cout << "QgsCustomProjectionDialog::getEllipseFromParameters()" << std::endl;
1008+
QgsLogger::debug("QgsCustomProjectionDialog::getEllipseFromParameters()");
10061009
QString myProj4String = leParameters->text();
10071010
QRegExp myEllipseRegExp( "\\+ellps=[a-zA-Z0-9\\-_]*" );
10081011
int myStart= 0;

0 commit comments

Comments
 (0)