SUMMARY The custom styles are erased on save of the dialog. STEPS TO REPRODUCE 1. Use new version of this thing 2. Open kate/kdevelop and color settings 3. Import same theme with multiple! (for multiple languages) custom styles (if not already present) 4. Set the theme as default and save the changes 5. Check the file for systax OBSERVED RESULT All styles apart from currently viewed one were removed in kate and probably everything in kdevelop. EXPECTED RESULT Dont touch my custom styles when not asked to. SOFTWARE/OS VERSIONS Operating System: Artix Linux KDE Plasma Version: 5.20.0 KDE Frameworks Version: 5.75.0 Qt Version: 5.15.1 Kernel Version: 5.8.14-artix1-1 OS Type: 64-bit Processors: 12 × AMD Ryzen 5 3600XT 6-Core Processor Memory: 31,4 GiB of RAM Graphics Processor: Radeon RX 570 Series ADDITIONAL INFORMATION For these production tests I used my script to convert my old theme to new format and imported it. On import the current theme in editor changed to it immediately but not the one in the dialog box. SO I changed it to my theme, I set it as default and pressed Apply (or OK?) Than I went mad that my changes which I sepnt my sweat and blood to keep were gone and the theme file was almost empty. By copying the full file to right place everything works fine unless I try to change some color in settings. And here I hoped it will work just fine.
Hi, I might misunderstand the bug. Do I understand correctly: 1) You import some theme, let's name it "A". 2) You set it as the default 3) You apply that by say "OK" => The custom styles in theme "A" vanish? Was there before some theme called "A" already?
On second thought, all what is needed is probably to select theme with custom styles as default and save. Before I described my exact steps how I did it. We can forget about importing, lets say you have theme with multiple custom styles for multiple languages and press save or ok when you set it as default. It should erase all custom styles, at most keep the currently selected one.
Ok, then I guess I see my fault :(
(In reply to Christoph Cullmann from comment #3) > Ok, then I guess I see my fault :( Even I did not test it so deeply when I was working on converter.
Git commit d80782ebd1d4d92b8ef9fa1593eb93a4c052f3a4 by Christoph Cullmann. Committed on 15/10/2020 at 13:22. Pushed by cullmann into branch 'master'. try to avoid to erase custom-styles for highlightings we didn't touch at all M +10 -5 src/syntax/katethemeconfig.cpp https://invent.kde.org/frameworks/ktexteditor/commit/d80782ebd1d4d92b8ef9fa1593eb93a4c052f3a4
Could you try the patch I commited? I am at the moment bit short on time here, it did compile and shall not make it worse, thought have not tried that out a lot.
I tested this here now, seems to work fine for me with this patch.