Git: Refresh RemoteModel when last remote was removed

The existing check prevented a model update if the remote
list was empty and therefore kept an orphan entry and forbid
adding the remote again until the dialog was re-opened.

Task-number: QTCREATORBUG-18904
Change-Id: I5a45919a8af5108d44f85f87a64a00cf459af3bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Andre Hartmann
2017-09-13 20:30:12 +02:00
committed by André Hartmann
parent c64374b7c7
commit 8488ce627b

View File

@@ -188,9 +188,6 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage
QMap<QString,QString> remotesList
= GitPlugin::client()->synchronousRemotesList(workingDirectory, errorMessage);
if (remotesList.isEmpty())
return false;
beginResetModel();
m_remotes.clear();
const QList<QString> remotes = remotesList.keys();