Replies: 1 comment
|
Opened a PR implementing the scope above: #626 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Forum thread: https://qelectrotech.org/forum/viewtopic.php?pid=16926#p16926
Problem
Resetting an active numbering counter (conductor, element, or folio) back to a starting value is something that happens very often during diagram work — starting a new sheet/section and wanting labels to restart at "1", or marking a run of items as "not yet assigned" pending manual numbering. Today that requires the full round trip through the project properties dialog: open it from the Autonum dock's "Configure" button, locate the right numbering context, select the specific part row, clear and retype the value in its field, and confirm — roughly seven actions for what's conceptually a single "reset" click.
What exists today
AutoNumberingDockWidget,sources/autoNum/ui/autonumberingdockwidget.*) already shows one combo box each for the active Conductor/Element/Folio numbering context (m_conductor_cb/m_element_cb/m_folio_cb) plus a single "Configure" button (on_m_configure_pb_clicked(),autonumberingdockwidget.cpp:333-341) that opensProjectPropertiesDialogon its Autonum page — a full detour through the general project-properties dialog for what is often a one-value tweak.QETProjectstores each category's set of named numbering contexts asQHash<QString, NumerotationContext>(conductorAutoNum()/elementAutoNum()/folioAutoNum(),qetproject.h:149-151), and exposesaddConductorAutoNum(key, context)/addElementAutoNum(...)/addFolioAutoNum(...)(qetproject.h:152-154) to write a context back — the same setters the config dialog itself uses, already wired to the change signals (conductorAutoNumChangedetc.) that keep the dock in sync.NumerotationContext::replaceValue(int index, QString content)already exists specifically to overwrite one part's value in place while preserving its type/increase/initialvalue/modulus — exactly the primitive a "reset" action needs, without touching the rest of the context's configuration.unitfolio/tenfolio/hundredfolio) already carry an explicitinitialvaluefield per part (NumerotationContext::addValue) — the value a "reset to start" action would restore for those specifically, rather than a hardcoded "1".Proposed scope
Add two small buttons next to each of the three combo boxes on the dock widget itself, skipping the configure dialog entirely for the common case:
replaceValue()on every part with a sensible per-type starting value — the part's owninitialvaluewhere one exists (folio-anchored types),"1"for plain numeric types,"a"/"A"for the alphabetic part type — then write the updated context back via the matchingaddConductorAutoNum/addElementAutoNum/addFolioAutoNumcall so the existing refresh signals fire as normal."?", for marking a run of items as "needs manual numbering" without picking a specific starting value.The original request's third idea (a small popup to type an arbitrary starting value) is effectively today's config-dialog value field made quicker to reach — proposing to fold that into a lightweight popup anchored to the dock's combo box rather than a third button per category, but open to a literal third button if that's preferred.
Related, not proposed here
The forum thread's second request (a live X/Y position readout while dragging elements) was already implemented separately and isn't part of this proposal.
Happy to build this if the scope above sounds right.
All reactions