Script should still work after loadsvg is used
authorSam Moore <[email protected]>
Thu, 25 Sep 2014 12:31:29 +0000 (20:31 +0800)
committerSam Moore <[email protected]>
Thu, 25 Sep 2014 12:31:29 +0000 (20:31 +0800)
This is why I always use "<= 0" not "== 0"...
Although if loops were unsigned that still wouldn't help.

src/debugscript.cpp
src/eye_of_the_rabbit.script [new file with mode: 0644]

index 19b51d7..fa32fc2 100644 (file)
@@ -93,7 +93,7 @@ void DebugScript::ParseAction()
 
 bool DebugScript::Execute(View *view, Screen *scr)
 {
-       if (currentAction.loops == 0)
+       if (currentAction.loops <= 0)
                ParseAction();
 
        switch(currentAction.type)
@@ -137,7 +137,7 @@ bool DebugScript::Execute(View *view, Screen *scr)
                view->ForceRenderDirty();
                view->ForceBufferDirty();
                view->ForceBoundsDirty();
-               currentAction.loops = 0;
+               currentAction.loops = 1;
                break;
        default:
                Fatal("Unknown script command in queue.");
diff --git a/src/eye_of_the_rabbit.script b/src/eye_of_the_rabbit.script
new file mode 100644 (file)
index 0000000..89ef39d
--- /dev/null
@@ -0,0 +1,11 @@
+# Test how well document scales back to original...
+cpu
+nolazy
+loadsvg svg-tests/rabbit_simple.svg
+loop 200 pxzoom 508 305 1
+loadsvg svg-tests/rabbit_simple.svg
+loop 200 pxzoom 508 305 1
+loadsvg svg-tests/rabbit_simple.svg
+loop 400 pxzoom 508 305 -1
+loop 400 pxzoom 508 305 1
+wait

UCC git Repository :: git.ucc.asn.au