For this question, I've coded a little script that draws mesh's elements indices with opengl.
All is working well, except when in edit mode, some grab, scale, rotate is done. In these cases the drawing needs to come back to object mode to work properly:
How can this be fixed? (I don't want the drawing to follow at runtime the transformation, but at least find a way to update it when the transformation is validated)