summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-10-17 14:32:30 +0200
committerMatthias Melcher <github@matthiasm.com>2024-10-17 14:32:42 +0200
commitacf3037ae8531e790247d6084972969523bf8297 (patch)
tree4eefdb536916f20b0019996730026752e59c7b23
parentc45493096644843cccd156d2ff85b67f7b63ae37 (diff)
FLUID: make sure that dialogs are visible for snapshots
-rw-r--r--fluid/autodoc.cxx10
1 files 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);