Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate save files based on game type #2122

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reset input field in case of incorrect file
  • Loading branch information
ihhub authored Dec 27, 2020
commit 58faf6431c85ca1c3abe13db073dd26fba4bd0e3
8 changes: 6 additions & 2 deletions src/fheroes2/dialog/dialog_selectfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,14 @@ std::string SelectFileListSimple( const std::string & header, const std::string
if ( ( *it ).file == lastfile )
break;

if ( it != lists.end() )
if ( it != lists.end() ) {
listbox.SetCurrent( std::distance( lists.begin(), it ) );
else
}
else {
filename.clear();
charInsertPos = 0;
listbox.Unselect();
}
}

if ( !editor && lists.empty() )
Expand Down