Skip to content

Commit

Permalink
safe guard on setData
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Nov 19, 2024
1 parent ef063a5 commit 05144f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pg_service_parser/core/copy_shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ def setData(self, index, value, role=Qt.EditRole):
for sh in self.shortcuts:
if sh.name == value:
return False
self.shortcuts[index.row()].rename(value)
self.dataChanged.emit(index, index)
return True
if index.column() == 0:
self.shortcuts[index.row()].rename(value)
self.dataChanged.emit(index, index)
return True

return False

0 comments on commit 05144f6

Please sign in to comment.