diff -ur ScummVM-cvs20021020/scummvm/scumm/dialogs.cpp ScummVM-cvs20021020+hack/scummvm/scumm/dialogs.cpp
old
|
new
|
|
321 | 321 | _saveMode = false; |
322 | 322 | _saveButton->setState(false); |
323 | 323 | _loadButton->setState(true); |
| 324 | _saveButton->setFlags(WIDGET_ENABLED); |
| 325 | _loadButton->clearFlags(WIDGET_ENABLED); |
| 326 | _savegameList->setEditable(false); |
324 | 327 | fillList(); |
325 | 328 | |
326 | 329 | ScummDialog::open(); |
… |
… |
|
334 | 337 | _saveMode = true; |
335 | 338 | _saveButton->setState(true); |
336 | 339 | _loadButton->setState(false); |
| 340 | _saveButton->clearFlags(WIDGET_ENABLED); |
| 341 | _loadButton->setFlags(WIDGET_ENABLED); |
| 342 | _savegameList->setEditable(true); |
337 | 343 | fillList(); |
338 | 344 | draw(); |
339 | 345 | } |
… |
… |
|
343 | 349 | _saveMode = false; |
344 | 350 | _saveButton->setState(false); |
345 | 351 | _loadButton->setState(true); |
| 352 | _saveButton->setFlags(WIDGET_ENABLED); |
| 353 | _loadButton->clearFlags(WIDGET_ENABLED); |
| 354 | _savegameList->setEditable(false); |
346 | 355 | fillList(); |
347 | 356 | draw(); |
348 | 357 | } |
349 | 358 | break; |
350 | 359 | case kListItemDoubleClickedCmd: |
351 | | if (_savegameList->getSelected() >= 0 && !_savegameList->getSelectedString().isEmpty()) { |
| 360 | if (_savegameList->getSelected() >= 0) { |
352 | 361 | if (_saveMode) { |
353 | | // Start editing the selected item, for saving |
354 | | _savegameList->startEditMode(); |
355 | | } else { |
| 362 | if (_savegameList->getSelectedString().isEmpty()) { |
| 363 | // Start editing the selected item, for saving |
| 364 | _savegameList->startEditMode(); |
| 365 | } else { |
| 366 | save(); |
| 367 | } |
| 368 | } else if (!_savegameList->getSelectedString().isEmpty()) { |
356 | 369 | load(); |
357 | 370 | } |
358 | 371 | } |