Skip to content

Annotation does not start with correct sheet number

Description

Annotation by sheet number*100 sometimes misses it for the first item.

Steps to reproduce

  1. Add one resistor R?. Make sure it stays selected.
  2. Annotate by selection
  3. Resistor is R1 instead of R101.

image

I noticed this as well when working on !1176 (merged)

I think we need to set the page numbers to start at 1 by default.

SCH_SHEET_PATH::SCH_SHEET_PATH()
{
~    m_virtualPageNumber = 1;
    m_current_hash = 0;
}

KiCad Version

Application: KiCad Schematic Editor

Version: 6.0.4-6f826c9f35~116~ubuntu21.10.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.74.0 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 libidn2/2.3.1 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3

Platform: Linux 5.13.0-39-generic x86_64, 64 bit, Little endian, wxGTK, KDE, x11

Build Info:
	Date: Mar 18 2022 15:49:07
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.74.0
	ngspice: 35
	Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
Edited by Mike Williams