diff --git a/proxyface/proxy.hxx b/proxyface/proxy.hxx index 789aece..56ac8b6 100644 --- a/proxyface/proxy.hxx +++ b/proxyface/proxy.hxx @@ -77,6 +77,9 @@ namespace gui { _auto.ping(_testUrl); } break; } + _lastType = _type->currentIndex(); + _lastUrl = _url->text(); + _lastPort = _port->value(); if (!retry) detecting(); } @@ -126,10 +129,20 @@ namespace gui { QDialog::accept(); } + virtual void reject() { + _type->setCurrentIndex(_lastType); + _url->setText(_lastUrl); + _port->setValue(_lastPort); + QDialog::reject(); + } + private: proxy::Face _auto; QUrl _testUrl; + int _lastType; + QString _lastUrl; + int _lastPort; };