PCB Editor - Running and cancelling DRC and rerunning again shows 0 errors

Description

If you have a PCB with errors on, when you run a DRC check and cancel before it finished and run it again it shows 0 errors evern though there are errors. If you close and re-open the DRC screen it works again.

Steps to reproduce

  1. Open a PCB which has some errors.
  2. Click on DRC window and run check - runs as normal and shows errors.
  3. Run another check and cancel before the check finishes.
  4. Then run another check - this time it shows 0 errors.
  5. To fix this you have to close the DRC window and re-open.

First DRC check with errors:

Screenshot_from_2022-11-05_16-33-09

Run check and cancel:

Screenshot_from_2022-11-05_16-33-18

Run another check:

Screenshot_from_2022-11-05_16-33-24

KiCad Version

Application: KiCad PCB Editor

Version: 6.99.0-unknown-6a0db3e7e2~154~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.0.5
	FreeType 2.11.1
	HarfBuzz 2.7.4
	FontConfig 2.13.1

Platform: Linux 5.15.0-52-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11

	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.81.0
	ngspice: 37
	Compiler: GCC 11.3.0 with C++ ABI 1016

Build settings:
	KICAD_SPICE=ON
Edited by Greg