Skip to content
Permalink
Browse files
Georeferencer: disable OK button in map coordinates dialog if no coor…
…dinates are entered.

git-svn-id: http://svn.osgeo.org/qgis/trunk@7052 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jun 27, 2007
1 parent 45bd37c commit b62b845b3364cdfa098e4d13c8689a5c52467351
Showing with 10 additions and 0 deletions.
  1. +9 −0 src/plugins/georeferencer/mapcoordsdialog.cpp
  2. +1 −0 src/plugins/georeferencer/mapcoordsdialog.h
@@ -22,6 +22,10 @@ MapCoordsDialog::MapCoordsDialog(const QgsPoint& pixelCoords, QgsMapCanvas* qgis
mToolEmitPoint = new QgsMapToolEmitPoint(qgisCanvas);
mToolEmitPoint->setButton(btnPointFromCanvas);
connect(mToolEmitPoint, SIGNAL(gotPoint(QgsPoint&,Qt::MouseButton)), this, SLOT(setXY(QgsPoint&)));

connect(leXCoord, SIGNAL(textChanged(const QString&)), this, SLOT(updateOK()));
connect(leYCoord, SIGNAL(textChanged(const QString&)), this, SLOT(updateOK()));
updateOK();
}


@@ -30,6 +34,11 @@ MapCoordsDialog::~MapCoordsDialog() {
delete mToolEmitPoint;
}

void MapCoordsDialog::updateOK()
{
bool enable = (leXCoord->text().size() != 0 && leYCoord->text().size() != 0);
buttonOk->setEnabled(enable);
}

void MapCoordsDialog::on_buttonOk_clicked() {
QgsPoint mapCoords(leXCoord->text().toDouble(), leYCoord->text().toDouble());
@@ -36,6 +36,7 @@ public slots:
void on_btnPointFromCanvas_clicked();

void setXY(QgsPoint &);
void updateOK();

private:

0 comments on commit b62b845

Please sign in to comment.