diff options
-rw-r--r-- | core/connectionlistmodel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/connectionlistmodel.cpp b/core/connectionlistmodel.cpp index 7f8b9894b..812c6508d 100644 --- a/core/connectionlistmodel.cpp +++ b/core/connectionlistmodel.cpp @@ -38,9 +38,11 @@ int ConnectionListModel::rowCount(const QModelIndex &parent) const void ConnectionListModel::addAddress(const QString address) { - beginInsertRows(QModelIndex(), rowCount(), rowCount()); - m_addresses.append(address); - endInsertRows(); + if (!m_addresses.contains(address)) { + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + m_addresses.append(address); + endInsertRows(); + } } void ConnectionListModel::removeAllAddresses() |