Skip to content
Snippets Groups Projects
Commit 9eb55ee9 authored by svornost's avatar svornost
Browse files

Remove previousSlaveInLine.tw and nextSlaveInLine.tw, and let Slave Interact...

Remove previousSlaveInLine.tw and nextSlaveInLine.tw, and let Slave Interact handle those functions directly without extra passage changes.
parent e6b2f68a
No related branches found
No related tags found
1 merge request!6325Avoid extra passage-switching when iterating through slaves with Next and Previous
:: Next Slave In Line
<<silently>>
<<set $i = $slaveIndices[$activeSlave.ID]>>
<<set $slaves[$i] = $activeSlave>> /* save changes before switching */
<<set $activeSlave = $slaves[$slavesInLine[1]]>>
<<goto "Slave Interact">>
<</silently>>
:: Previous Slave In Line
<<silently>>
<<set $i = $slaveIndices[$activeSlave.ID]>>
<<set $slaves[$i] = $activeSlave>> /* save changes before switching */
<<set $activeSlave = $slaves[$slavesInLine[0]]>>
<<goto "Slave Interact">>
<</silently>>
......@@ -66,7 +66,7 @@
[←,Q]
</span>
<span id="prevSlave" style="font-weight:bold">
<<link "Prev" "Previous Slave In Line">><</link>>
<<link "Prev" "Slave Interact">><<set $slaves[_i] = $activeSlave, $activeSlave = $slaves[$slavesInLine[0]]>><</link>>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span class='slave-name'>
......@@ -74,7 +74,7 @@
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<span id="nextSlave" style="font-weight:bold">
<<link "Next" "Next Slave In Line">><</link>>
<<link "Next" "Slave Interact">><<set $slaves[_i] = $activeSlave, $activeSlave = $slaves[$slavesInLine[1]]>><</link>>
</span>
<span class="cyan">
[E,→]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment