From acf3037ae8531e790247d6084972969523bf8297 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 17 Oct 2024 14:32:30 +0200 Subject: [PATCH] FLUID: make sure that dialogs are visible for snapshots --- fluid/autodoc.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fluid/autodoc.cxx b/fluid/autodoc.cxx index 76ded3143..0f2ea8e4a 100644 --- a/fluid/autodoc.cxx +++ b/fluid/autodoc.cxx @@ -437,7 +437,8 @@ void run_autodoc(const Fl_String &target_dir) { // explain widgets types an their dnd option // explain menu arrays // list exceptions (subwindow, scroll) - if (!widgetbin_panel) make_widgetbin(); + Fl::wait(0.2); + Fl::flush(); fl_snapshot((target_dir + "widgetbin_panel.png").c_str(), widgetbin_panel, win_margin, win_blend); // ---- code view @@ -446,8 +447,13 @@ void run_autodoc(const Fl_String &target_dir) { // show various tabs // explain find and locate if (!codeview_panel) make_codeview(); - update_codeview_cb(NULL, NULL); + codeview_panel->show(); + Fl::wait(0.2); + Fl::flush(); + update_codeview_cb(NULL, NULL); // must be visible on screen for this to work cv_tab->value(cv_source_tab); + codeview_panel->redraw(); + Fl::flush(); fl_snapshot((target_dir + "codeview_panel.png").c_str(), codeview_panel, win_margin, win_blend); fl_snapshot((target_dir + "cv_find_row.png").c_str(), cv_find_row, row_margin, row_blend); fl_snapshot((target_dir + "cv_settings_row.png").c_str(), cv_settings_row, row_margin, row_blend);