theodore-norvell / PLAAY

Senior Design Project PLAAY (Programming Language for Adults And Youth)
2 stars 0 forks source link

Swapping with the top of the trash stack is broken #72

Closed WNewhook closed 7 years ago

WNewhook commented 7 years ago

Ctrl+b is supposed to do: getFromTrash().map( (src : Selection) => treeMgr.swap( src, currentSelection ).map( (sel : Selection) => update( sel ) ) ) ;

but the edit always fails at the first line in applyEdit:

if( this._srcSelection.root() !== trgSelection.root() ) { return none<Selection>() ; }

theodore-norvell commented 7 years ago

This is actually the correct behaviour. Swap only applies when the two selections share the same tree.