From ecac03b032c4d1484408b892024135a814cd3265 Mon Sep 17 00:00:00 2001
From: madelinegr <mgriswold99@gmail.com>
Date: Fri, 7 Jun 2019 15:53:21 -0400
Subject: Hide Until Presented Is Done

---
 src/client/views/presentationview/PresentationElement.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/client/views/presentationview/PresentationElement.tsx')

diff --git a/src/client/views/presentationview/PresentationElement.tsx b/src/client/views/presentationview/PresentationElement.tsx
index 33c0289d7..2621b92a3 100644
--- a/src/client/views/presentationview/PresentationElement.tsx
+++ b/src/client/views/presentationview/PresentationElement.tsx
@@ -20,7 +20,7 @@ interface PresentationElementProps {
 
 }
 
-enum buttonIndex {
+export enum buttonIndex {
     Show = 0,
     Navigate = 1,
     HideTillPressed = 2,
@@ -120,14 +120,15 @@ export default class PresentationElement extends React.Component<PresentationEle
     @action
     onHideDocumentUntilPressClick = (e: React.MouseEvent) => {
         e.stopPropagation();
+        const current = NumCast(this.props.mainDocument.selectedDoc);
         if (this.selectedButtons[buttonIndex.HideTillPressed]) {
             this.selectedButtons[buttonIndex.HideTillPressed] = false;
             this.props.document.opacity = 1;
-
         } else {
             this.selectedButtons[buttonIndex.HideTillPressed] = true;
-            this.props.document.opacity = 0;
-
+            if (this.props.index > current) {
+                this.props.document.opacity = 0;
+            }
         }
     }
 
-- 
cgit v1.2.3-70-g09d2

