mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-02 08:24:14 +02:00
1d339a8b27
Review findings on the prefix editor: - OK without touching anything changed the file: every row was written back, so an explicit <prefix/>, which reads as an empty field and cancels the inheritance, was dropped and that folder started inheriting its parent's prefix again. A row is now written only when it was edited or no longer holds what the file has, and the two kinds of empty field look different: hasPrefix() tells an explicit <prefix/> from a missing one, which is what the field hint shows. - load() copied a broken file aside before the user had chosen anything, so every "Corriger le fichier" left a .bak behind while the message said nothing had been modified. The copy is now made by save(), right before the file is replaced: repairing or cancelling leaves nothing behind, and a copy that cannot be made stops the write rather than destroying the only copy. - The button followed the combo box only for "Parcourir...": put back on "Par defaut" it fell back to the previously saved path instead of the default one. The directory of the entry being displayed is now used, "Par defaut" being dataDir()/elements/.