cancel button now resets settings, refs #5
This commit is contained in:
@@ -77,6 +77,9 @@ namespace gui {
|
|||||||
_auto.ping(_testUrl);
|
_auto.ping(_testUrl);
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
_lastType = _type->currentIndex();
|
||||||
|
_lastUrl = _url->text();
|
||||||
|
_lastPort = _port->value();
|
||||||
if (!retry) detecting();
|
if (!retry) detecting();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,10 +129,20 @@ namespace gui {
|
|||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void reject() {
|
||||||
|
_type->setCurrentIndex(_lastType);
|
||||||
|
_url->setText(_lastUrl);
|
||||||
|
_port->setValue(_lastPort);
|
||||||
|
QDialog::reject();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
proxy::Face _auto;
|
proxy::Face _auto;
|
||||||
QUrl _testUrl;
|
QUrl _testUrl;
|
||||||
|
int _lastType;
|
||||||
|
QString _lastUrl;
|
||||||
|
int _lastPort;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user