feat(tier4): Add 5-second delay before showing patch modal so user can see it
This commit is contained in:
26
fix_modal.py
Normal file
26
fix_modal.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import re
|
||||
with open('src/gui_2.py', 'r', encoding='utf-8', newline='') as f:
|
||||
c = f.read()
|
||||
|
||||
# Fix the reject button handler - add timestamp reset
|
||||
old = ''' if imgui.button("Reject", imgui.ImVec2(150, 0)):
|
||||
self._show_patch_modal = False
|
||||
self._pending_patch_text = None
|
||||
self._pending_patch_files = []
|
||||
self._patch_error_message = None
|
||||
imgui.close_current_popup()'''
|
||||
|
||||
new = ''' if imgui.button("Reject", imgui.ImVec2(150, 0)):
|
||||
self._show_patch_modal = False
|
||||
self._pending_patch_text = None
|
||||
self._pending_patch_files = []
|
||||
self._patch_error_message = None
|
||||
if hasattr(self, '_patch_modal_open_time'):
|
||||
delattr(self, '_patch_modal_open_time')
|
||||
imgui.close_current_popup()'''
|
||||
|
||||
c = c.replace(old, new)
|
||||
|
||||
with open('src/gui_2.py', 'w', encoding='utf-8', newline='') as f:
|
||||
f.write(c)
|
||||
print('Done')
|
||||
Reference in New Issue
Block a user