Skip to content

Commit 6fa6add

Browse files
author
wonder
committedJun 27, 2007

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎src/plugins/georeferencer/mapcoordsdialog.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ MapCoordsDialog::MapCoordsDialog(const QgsPoint& pixelCoords, QgsMapCanvas* qgis
2222
mToolEmitPoint = new QgsMapToolEmitPoint(qgisCanvas);
2323
mToolEmitPoint->setButton(btnPointFromCanvas);
2424
connect(mToolEmitPoint, SIGNAL(gotPoint(QgsPoint&,Qt::MouseButton)), this, SLOT(setXY(QgsPoint&)));
25+
26+
connect(leXCoord, SIGNAL(textChanged(const QString&)), this, SLOT(updateOK()));
27+
connect(leYCoord, SIGNAL(textChanged(const QString&)), this, SLOT(updateOK()));
28+
updateOK();
2529
}
2630

2731

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

37+
void MapCoordsDialog::updateOK()
38+
{
39+
bool enable = (leXCoord->text().size() != 0 && leYCoord->text().size() != 0);
40+
buttonOk->setEnabled(enable);
41+
}
3342

3443
void MapCoordsDialog::on_buttonOk_clicked() {
3544
QgsPoint mapCoords(leXCoord->text().toDouble(), leYCoord->text().toDouble());

‎src/plugins/georeferencer/mapcoordsdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public slots:
3636
void on_btnPointFromCanvas_clicked();
3737

3838
void setXY(QgsPoint &);
39+
void updateOK();
3940

4041
private:
4142

0 commit comments

Comments
 (0)
Please sign in to comment.