Symbol Editor: "Revert" command is available even if current symbol hasn't been modified
Description
In Symbol Editor, when you open a symbol, at first, and prior to any modification, "Revert" command (menu "File"/"Revert") is not enabled - which is expected.
However, if you start modifying any other symbol in any library, then the symbol you're visualizing can be "reverted" - even if you hadn't made any change on this symbol, or even this library.
Plus, the "Revert" command's warning window tells us about possible loss of modifications of the current viewed component, again, even if this component hasn't been edited at all.
Using "Revert" button doesn't deactivate "Revert" entry in "File" menu. So we don't know if "Revert" is effective or not...
Steps to reproduce
-
Open Symbol Editor
-
In left Libraries browser, select a symbol, in any library, by double-clicking its name
-
The symbol is loaded and visualized in Symbol Editor
-
Check the state of "Revert" entry menu in "File" menu: it's disabled
-
Also check that Symbol Editor window's title has no asterisk before the "library:component" name
-
Now Modify the symbol (any modification). (You can Ctrl-Z it).
-
Check the state of "Revert" entry menu in "File" menu: it's now enabled
-
Also check that Symbol Editor window's title has an asterisk before the "library:component" name
-
And check that, in left Libraries browser, the currently loaded symbol name and its library name have their font now bold and an asterisk has been added on the right side of the names (ie. "library_name *" and "symbol_name *")
-
In left Libraries browser, select an other symbol in an other library by double clicking its name
-
Do not modify this symbol
-
Check that the previously modified component, and its library name, in left Libraries browser, have still their font bold and an asterisk is still present on the right side of their names (ie. "library_name *" and "symbol_name *")
-
Now open "File" menu: the "Revert" command is enabled
-
Click on "Revert" command in "File" menu
-
Check that "Revert" command's warning window tells us: "Revert 'symbol_currently_visualized' to last version saved?" even if symbol_currently_visualized has not been modified at all
-
Click on "Revert" button
-
Check that the previously modified component, and its library name, in left Libraries browser, have still their font bold and an asterisk is still present on the right side of their names (ie. "libraryname *" and "symbolname *")
-
Check that the state of "Revert" entry menu in "File" menu is still enabled
KiCad Version
Application: KiCad Symbol Editor
Version: 6.0.1-79c1e3a40b~116~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
Platform: Linux 5.4.0-96-generic x86_64, 64 bit, Little endian, wxGTK, xubuntu, x11
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 31
Compiler: GCC 9.3.0 with C++ ABI 1013
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON