Commit 90ab2865 authored by Alexander Schuch's avatar Alexander Schuch
Browse files

Remove unused code.

parent 6e75b6b2
......@@ -192,16 +192,11 @@ public:
if ((!m_availablePlayerId.empty()) && (!m_selectablePlayer.empty())) {
beginInsertRows(QModelIndex(), players, players);
// Get the player controller of the last added player. If no player
// has been added yet, use the very first registered player
// controller as default.
// Use the given player controller. If none is given, use the very
// first registered player controller as default.
if (!selectedPlayer)
if (!selectedPlayer) {
selectedPlayer = m_selectablePlayer.front();
QString guiName = selectedPlayer->guiName();
if (!m_players.isEmpty()) {
guiName = m_players.last()->guiName();
}
player = getNewPlayerByGui(selectedPlayer, m_availablePlayerId.front().second, m_availablePlayerId.front().first);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment