This patch adds a hotkey that will swap between the two most recently selected layers. This would complete task T1734.
Although it generally seems to work fine, I have noticed two minor problems that I'm not sure how to solve:
- Using the hotkey after reordering layers will cause the wrong layer to be selected. This is because activateNodeImpl() gets called when a layer is moved around in the stack.
- Bug 373741 ("Drawing while switching between layers with PgUp/PgDown results in a layer acting like it's in a locked group") applies and is easier to reproduce (at step 2, hold the hotkey instead of alternating page-up and page-down).
Additionally, I'm uncertain about previouslyActiveNode. Is KisNodeWSP the type I should be using? Also, am I doing the right thing to check if it's valid inside of switchToPreviouslyActiveNode()?