Skip to content

Commit

Permalink
Prevent locked drawings to be deleted. Fixes #2948
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Mar 16, 2020
1 parent fb269da commit b01c11f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gns3/graphics_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,9 @@ def deleteActionSlot(self):
QtWidgets.QMessageBox.critical(self, "Delete", "Cannot delete node '{}' because it is locked".format(node.name()))
return
selected_nodes.append(node)
if isinstance(item, DrawingItem) and item.locked():
QtWidgets.QMessageBox.critical(self, "Delete", "Cannot delete drawing because it is locked")
return
if selected_nodes:
if len(selected_nodes) > 1:
question = "Do you want to permanently delete these {} nodes?".format(len(selected_nodes))
Expand Down

0 comments on commit b01c11f

Please sign in to comment.