add Erase Ride(s) button to download dialog

This is a workaround for the SRM erase bug.  It gives the user a way to
try erasing the device's memory without re-downloading a ride.
This commit is contained in:
Sean Rhea
2010-02-04 06:49:21 -08:00
parent f4769f5fd6
commit 3b0c4e635e
3 changed files with 32 additions and 3 deletions

View File

@@ -135,8 +135,8 @@ SrmDevice::cleanup(CommPortPtr dev)
if (!dev2path(dev, path, err))
assert(false);
if (QMessageBox::question(0, "Powercontrol",
"Erase downloaded ride from device memory?",
"&Erase", "&Save Only", "", 1, 1) == 0) {
"Erase ride from device memory?",
"&Erase", "&Cancel", "", 1, 1) == 0) {
SrmpcConn srm(path);
if(!srm.d || (srmpc_clear_chunks(srm.d) < 0)) {
QMessageBox::warning(0, "Error",