Skip to content

Commit 0bc2117

Browse files
SG-40184: Cancel clear if plugin refuses (#961)
### Linked issues SG-40184 ### Summarize your change. Super simple change where we return early if an event handler catches the before-clear event and returns "cancel". ### Describe the reason for the change. We dont usually check for confirmation before clearing the session, but in upcoming live review changes it will pop up a confirmation dialog if a review session is in progress. ### Describe what you have tested and on which operating system. macOS ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. Signed-off-by: Patrick Bergeron <[email protected]>
1 parent c5c0e88 commit 0bc2117

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/app/mu_rvui/rvui.mu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3604,7 +3604,9 @@ global let enterFrame = startTextEntryMode(\: (string;) {"Go To Frame: ";}, goto
36043604
let mode = cacheMode(),
36053605
presMode = presentationMode();
36063606

3607-
sendInternalEvent ("before-session-clear-everything", "", "rvui");
3607+
let result = sendInternalEvent ("before-session-clear-everything", "", "rvui");
3608+
if (result == "cancel")
3609+
return;
36083610

36093611
setPresentationMode(false);
36103612
clearSession();

0 commit comments

Comments
 (0)