From 906cb8f92b01f0f00966efb936e033f787c9d60a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 5 Oct 2023 14:10:00 +0100 Subject: [PATCH] Fix initialisation when jumping to a tour step --- plugins/tiddlywiki/tour/globals.tid | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/tiddlywiki/tour/globals.tid b/plugins/tiddlywiki/tour/globals.tid index 3751d0255..0b56304d2 100644 --- a/plugins/tiddlywiki/tour/globals.tid +++ b/plugins/tiddlywiki/tour/globals.tid @@ -34,6 +34,7 @@ These config tiddlers may be changed directly as required: \end \procedure tour-initialise-current-tour-step() +\procedure tv-action-refresh-policy() always <$transclude $tiddler={{$:/state/tour/step}} $field="enter-actions"/> \end @@ -58,22 +59,26 @@ These config tiddlers may be changed directly as required: \end tour-chooser \procedure tour-start(title,step) +\procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/config/CurrentTour" text=<>/> <$transclude $variable="tour-restart" step=<<step>>/> \end \procedure tour-restart(step) +\procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/config/ShowTour" text="show"/> <$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [<step>!is[blank]] :else[all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/> <<tour-initialise-current-tour-step>> \end \procedure tour-next-step() +\procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [all[shadows+tiddlers]tag<tour-current-tag>after{$:/state/tour/step}else[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/finished]] }}}/> <<tour-initialise-current-tour-step>> \end \procedure tour-previous-step() +\procedure tv-action-refresh-policy() always <$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [all[shadows+tiddlers]tag<tour-current-tag>before{$:/state/tour/step}] :else[all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/> <<tour-initialise-current-tour-step>> \end