mirror of https://github.com/KLayout/klayout.git
Maybe fixed a potential segfault (0-1 as row index)
This commit is contained in:
parent
61c9c12414
commit
84a9853435
|
|
@ -161,7 +161,10 @@ void MacroTreeModel::macro_changed ()
|
|||
|
||||
void MacroTreeModel::update_data ()
|
||||
{
|
||||
emit dataChanged (index (0, 0, QModelIndex ()), index (rowCount (QModelIndex()) - 1, 0, QModelIndex ()));
|
||||
int rc = rowCount (QModelIndex());
|
||||
if (rc > 0) {
|
||||
emit dataChanged (index (0, 0, QModelIndex ()), index (rc - 1, 0, QModelIndex ()));
|
||||
}
|
||||
}
|
||||
|
||||
void MacroTreeModel::about_to_change ()
|
||||
|
|
|
|||
Loading…
Reference in New Issue