cancel button now resets settings, refs #5

master
Marc Wäckerlin 15 years ago
parent d748160cca
commit 69eea6417a
  1. 13
      proxyface/proxy.hxx

@ -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;
}; };

Loading…
Cancel
Save