Skip to content

Commit

Permalink
Resetting item name to default when clearing filename
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Oct 25, 2023
1 parent d11ada9 commit f569aea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/session/SessionModelCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,13 @@ bool SessionModelCore::setData(const QModelIndex &index,
}

switch (static_cast<ColumnType>(index.column())) {
case ColumnType::Name:
if (value.toString().isEmpty())
return false;
undoableAssignment(index, &item.name, value.toString());
case ColumnType::Name: {
auto name = value.toString();
if (name.isEmpty())
name = getTypeName(getItemType(index));
undoableAssignment(index, &item.name, name);
return true;

}
case ColumnType::None:
return true;

Expand Down

0 comments on commit f569aea

Please sign in to comment.