fix(cpn) Delete Label, Import models, Add fav

CMPN: Correct not reading models if no labels.yml

CMPN: Fix crash if no delete with no label selected
This commit is contained in:
dlktdr
2022-09-06 21:04:10 +10:00
committed by Peter Feerick
parent c103abb58b
commit 32a6f792b9
3 changed files with 20 additions and 16 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ bool LabelsModel::insertRows(int row, int count, const QModelIndex &parent)
bool LabelsModel::removeRows(int row, int count, const QModelIndex &parent)
{
if (parent.isValid())
if (parent.isValid() || row < 0)
return false;
bool deleted=false;
beginRemoveRows(parent, row, row + count - 1);