Commit ef55574a authored by Ivan Yossi's avatar Ivan Yossi 👌

Fix PaletteDocker not showing palettes

Reverts 97c03e0f

 "-1" is a QMap key to signal "root group"

Changed Q_ASSERT to KIS_ASSERT_RECOVER_RETURN_VALUE to
try and avoid crashing if Qt is compiled in debug mode.

BUG:414890
parent 08e7240a
......@@ -91,14 +91,11 @@ Qt::ItemFlags KisPaletteModel::flags(const QModelIndex& index) const
QModelIndex KisPaletteModel::index(int row, int column, const QModelIndex& parent) const
{
Q_UNUSED(parent);
Q_UNUSED(parent)
Q_ASSERT(m_colorSet);
int groupNameRow = groupNameRowForRow(row);
if (groupNameRow == -1) {
return {};
}
KisSwatchGroup *group = m_colorSet->getGroup(m_rowGroupNameMap[groupNameRow]);
Q_ASSERT(group);
KIS_ASSERT_RECOVER_RETURN_VALUE(group,QModelIndex());
return createIndex(row, column, group);
}
......
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