@@ -108,11 +108,13 @@ void Categories::onCategoryOrderChanged(const std::vector<unsigned int>& cat_ord
109 if (static_cast<int>(pos) != old_pos) {
109 if (static_cast<int>(pos) != old_pos) {
110 int target_pos = pos;
110 int target_pos = pos;
111+ if (target_pos > old_pos)
111 const bool status = beginMoveRows(QModelIndex(), old_pos, old_pos, QModelIndex(), target_pos);
113 const bool status = beginMoveRows(QModelIndex(), old_pos, old_pos, QModelIndex(), target_pos);
112 if (status)
114 if (status)
113 m_categoryOrder.move(old_pos, pos);
115 m_categoryOrder.move(old_pos, pos);
115− qWarning("beginMoveRows failed");
117+ qWarning() << "beginMoveRows failed:" << old_pos << target_pos;
116 endMoveRows();
118 endMoveRows();