@Override
	public void toggleEditability(int row, AttributeTableModel model) {
		Node node = doc.tree.getEditingNode();
		String key = (String) model.keys.get(row);
		
		Object oldAndNewValue = node.getAttribute(key);
		
		boolean oldReadOnly = node.isReadOnly(key);
		boolean readOnly = !oldReadOnly;
		
		node.setReadOnly(key, readOnly);
		model.readOnly.set(row, new Boolean(readOnly));
		
		// undo
		CompoundUndoable undoable = new CompoundUndoablePropertyChange(doc.tree);
		undoable.setName("Toggle Node Attribute Editability");
		Undoable primitive = new PrimitiveUndoableAttributeChange(node, key, oldAndNewValue, oldReadOnly, key, oldAndNewValue, readOnly);
		undoable.addPrimitive(primitive);
		doc.getUndoQueue().add(undoable);
		
		update(); // [md] Added so that modification date updates.
	}