diff --git a/src/RemoteDock.cpp b/src/RemoteDock.cpp index 3b9629bc..b2530115 100644 --- a/src/RemoteDock.cpp +++ b/src/RemoteDock.cpp @@ -119,7 +119,11 @@ void RemoteDock::setNewIdentity(const QString& identity) // Check if the dummy item is still there and remove it if it is if(ui->comboUser->itemData(0) == "dummy") + { + ui->comboUser->blockSignals(true); ui->comboUser->removeItem(0); + ui->comboUser->blockSignals(false); + } // Get certificate file name QString cert = ui->comboUser->itemData(ui->comboUser->findText(identity), Qt::UserRole).toString(); diff --git a/src/RemoteModel.cpp b/src/RemoteModel.cpp index 809b8f5f..1cbd0fed 100644 --- a/src/RemoteModel.cpp +++ b/src/RemoteModel.cpp @@ -158,8 +158,8 @@ void RemoteModel::parseDirectoryListing(const QString& text, const QVariant& use } // Insert data - beginInsertRows(parent, 0, static_cast(array.size())); std::vector items = RemoteModelItem::loadArray(array, parentItem); + beginInsertRows(parent, 0, static_cast(items.size() - 1)); for(RemoteModelItem* item : items) parentItem->appendChild(item); endInsertRows();