Commit 6b284399 authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Fixed errors in UploadHierarchyListModel.

parent 7008af77
......@@ -45,7 +45,7 @@ UploadHierarchyListModel::UploadHierarchyListModel(
: QAbstractListModel(parent),
m_hierarchy(model.m_hierarchy),
m_workingRoot(m_hierarchy.root()),
m_selectedIds()
m_selectedIds(model.m_selectedIds)
{
}
......@@ -229,6 +229,7 @@ void UploadHierarchyListModel::setHierarchy(const UploadHierarchyResp &uhr)
beginResetModel();
m_hierarchy = uhr;
m_workingRoot = m_hierarchy.root();
m_selectedIds.clear();
endResetModel();
}
......@@ -283,6 +284,10 @@ QString UploadHierarchyListModel::navigatedRootName(bool takeSuper,
}
}
if ((!sep.isEmpty()) && (0 != rootName.indexOf(sep))) {
rootName = sep + rootName;
}
return rootName;
}
......
......@@ -169,6 +169,8 @@ public:
/*!
* @brief Toggles the node selection.
*
* @note Emits dataChanged() signal.
*
* @param[in] row Sub-node index to be used.
* @return True if selection was toggled.
*/
......
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