diff --git a/src/ui.cpp b/src/ui.cpp index 90147c1..f2a2b0f 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1826,7 +1826,13 @@ void rebuild_cursors_pane(App& app) { for (int r = 0; r < app.rows->row_count(); ++r) { if (!rulers) break; char who[64]; - std::snprintf(who, sizeof(who), "row %d", r); + // A row split into cells names its plots the way the rest of the UI does ("plot 2a"); an + // unsplit row keeps the wording it always had. + if (app.rows->cells_in_row(app.rows->figure_row_of(r)) > 1) { + std::snprintf(who, sizeof(who), "plot %s", app.rows->plot_label(r).c_str()); + } else { + std::snprintf(who, sizeof(who), "row %d", r); + } app.cursors_lines.push_back(cursors_line(app, who, plot::Color::hex(0), false)); app.cursors_lines.back().row = r; app.cursors_lines.back().slot = -1; @@ -7011,6 +7017,10 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit } std::printf("]"); } + // The split, appended so every field before it keeps its place: cells per figure row, and the + // cell weights per figure row (`|` between rows, empty for an unsplit one). RowSet only. + std::printf(" cells=[%s] colweights=[%s]", layout_cells_text(rows).c_str(), + layout_colweights_text(rows).c_str()); std::printf("\n"); for (int r = 0; r < rows.row_count() && r < RowSet::kMaxRows; ++r) { for (int s = 0; s < RowSet::kSlotsPerRow; ++s) { diff --git a/src/ui_app.hpp b/src/ui_app.hpp index ab49297..172d9f6 100644 --- a/src/ui_app.hpp +++ b/src/ui_app.hpp @@ -2112,6 +2112,11 @@ GtkWidget* layout_cell_button(App& a, int fr, int pos); GtkWidget* layout_col_handle(App& a, int plot); void layout_col_apply(App& app, int plot, double offset_px); void layout_probe_report(App& a, const char* what); +/// The split in the report lines, from the `RowSet` alone (no widget is asked, so the exit dump can +/// use them): cells per figure row (`1,2,1`) and each figure row's cell weights, rows divided by `|` +/// and empty for an unsplit row (`|0.3,0.7|`). +std::string layout_cells_text(const RowSet& rs); +std::string layout_colweights_text(const RowSet& rs); void layout_click(GtkWidget* b); void layout_probe_next(App& a, int step, guint delay_ms); gboolean layout_probe_step(gpointer user); diff --git a/src/ui_probe.cpp b/src/ui_probe.cpp index 81de1a7..342b268 100644 --- a/src/ui_probe.cpp +++ b/src/ui_probe.cpp @@ -3384,6 +3384,28 @@ gboolean window_probe(gpointer user) { return G_SOURCE_REMOVE; } +std::string layout_cells_text(const RowSet& rs) { + std::string out; + for (int fr = 0; fr < rs.figure_row_count(); ++fr) { + out += (fr == 0 ? "" : ",") + std::to_string(rs.cells_in_row(fr)); + } + return out; +} + +std::string layout_colweights_text(const RowSet& rs) { + std::string out; + for (int fr = 0; fr < rs.figure_row_count(); ++fr) { + if (fr != 0) out += "|"; + const std::vector& w = rs.cell_weights(fr); + for (std::size_t k = 0; k < w.size(); ++k) { + char buf[32]; + std::snprintf(buf, sizeof(buf), "%s%g", k == 0 ? "" : ",", static_cast(w[k])); + out += buf; + } + } + return out; +} + void layout_probe_report(App& a, const char* what) { const int rows = a.rows->row_count(); const double scale = (a.area != nullptr && a.area->device_scale() > 0.0f) @@ -3459,7 +3481,8 @@ void layout_probe_report(App& a, const char* what) { } } std::fprintf(stderr, "[layout-probe] %-12s rows=%d buttons=%zu done=%d done_box=[%s] " - "rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s] side_w=%d\n", + "rows_y=[%s] close=[%s] add=[%s] resize=[%s] traces=[%s] side_w=%d cells=[%s] " + "colweights=[%s]\n", what, rows, a.layout_buttons.size(), a.layout_done_button != nullptr ? 1 : 0, done_box.c_str(), geom.c_str(), close_tops.c_str(), add_tops.c_str(), resize_tops.c_str(), @@ -3467,7 +3490,8 @@ void layout_probe_report(App& a, const char* what) { // The sidebar, which is the pane a divider position can silently take away: `side_w` // must be its own request (320) rather than 0, and `divider` the position the window's // width less the sidebar's column left it at. - a.side_box != nullptr ? gtk_widget_get_width(a.side_box) : -1); + a.side_box != nullptr ? gtk_widget_get_width(a.side_box) : -1, + layout_cells_text(*a.rows).c_str(), layout_colweights_text(*a.rows).c_str()); std::fflush(stderr); } @@ -4323,9 +4347,32 @@ gboolean split_probe_step(gpointer user) { split_probe_next(*a); break; } - case 18: + case 18: { split_probe_report(*a, "after-assign"); + // The cursors pane's ruler labels (`rebuild_cursors_pane()`, ruler modes): a plot of a split row is + // "plot