Private
Public Access
fix(ctx): Remove erroneous recursive call to render_text_viewer_window
This commit is contained in:
@@ -4198,7 +4198,6 @@ def render_text_viewer_window(app: App) -> None:
|
|||||||
imgui.end_popup()
|
imgui.end_popup()
|
||||||
#endregion: Inject File Modal
|
#endregion: Inject File Modal
|
||||||
|
|
||||||
render_text_viewer_window(app)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def render_patch_modal(app: App) -> None:
|
def render_patch_modal(app: App) -> None:
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ def test_text_viewer_window_invoked_in_render_loop():
|
|||||||
content = f.read()
|
content = f.read()
|
||||||
call_pattern = r'render_text_viewer_window\(app\)'
|
call_pattern = r'render_text_viewer_window\(app\)'
|
||||||
matches = list(re.finditer(call_pattern, content))
|
matches = list(re.finditer(call_pattern, content))
|
||||||
assert len(matches) >= 2, f"render_text_viewer_window should be called at least 2 times (once in window, once in modal hook), found {len(matches)}"
|
assert len(matches) >= 1, f"render_text_viewer_window should be called at least once in the main render loop, found {len(matches)}"
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pytest.main([__file__, '-v'])
|
pytest.main([__file__, '-v'])
|
||||||
|
|||||||
Reference in New Issue
Block a user