gui2/mp_connect: Fix adding new servers under built-ins
If the current selection was a built-in server, the new server would be added right below it even if it wasn't the last built-in server, resulting in a new entry that can't be deleted without closing the dialog and launching it again to force the server list to be re-enumerated correctly.
This commit is contained in:
parent
57ef823750
commit
1104d3756f
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ void mp_connect::on_server_add()
|
|||
|
||||
const std::size_t mem_pos = selection.user_defined() && !user_servers_.empty()
|
||||
? 1 + selection.relative_index() : 0;
|
||||
const unsigned int ui_pos = 1 + selection.row();
|
||||
const unsigned int ui_pos = selection.user_defined() ? 1 + selection.row() : builtin_servers_.size();
|
||||
|
||||
std::string name;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue