Replaced occurrences of deprecated tuple.valX() with tuple.N in envelope_editor.rs