95 |
if offs >= 1: |
if offs >= 1: |
96 |
p('delete:', offs) |
p('delete:', offs) |
97 |
alphContent.deleteText(node, offs - 1, offs) |
alphContent.deleteText(node, offs - 1, offs) |
98 |
offs = cur.setCursorOffset(offs - 1) |
cur.setCursorOffset(offs - 1) |
|
text = alphContent.getText(self.fenPDF.fen.constgraph, node) |
|
|
if offs == 0 and len(text) == 0: |
|
|
# If text went to nothingness |
|
|
if self.fenPDF.structure.structLink.isLinked(node): |
|
|
# Kludge workaround: insert # if it is linked |
|
|
self.fenPDF.structure.alphContent.insertText(node, 0, "#") |
|
|
else: |
|
|
# Delete the note |
|
|
self.fenPDF.structure.structLink.detach(node) |
|
|
self.fenPDF.structure.canvas2d.removeNode(node) |
|
|
cur.setAccursed(None) |
|
99 |
|
|
100 |
self.fenPDF.animation.regenerateVS() |
self.fenPDF.animation.regenerateVS() |
101 |
|
|