SUMMARY Currently, no widget except for dlg_layersplit uses the KisDialogStateSaver facility. This makes them lose their state when switching between them. Rakurri on KA noticed it first: https://krita-artists.org/t/first-alpha-of-my-gsoc-project-procedural-texture-generator/8127/6 There is a MR that needs some love here: https://invent.kde.org/graphics/krita/-/merge_requests/44 STEPS TO REPRODUCE 1. Try adding a new Fill Layer. 2. Configure a type. 3. Change to a different type and back. OBSERVED RESULT The widgets are reset. EXPECTED RESULT The initial configuration (2) should be preserved. SOFTWARE/OS VERSIONS Windows: 10 1903 macOS: 10.15.6 Linux/KDE Plasma: Manjaro Linux (rolling release) (available in About System) KDE Plasma Version: N/A KDE Frameworks Version: 5.64.0 Qt Version: 5.12.8 ADDITIONAL INFORMATION
For Fill Layers, KisDialogStateSaver is only a solution for the first time they are opened. When switching between types, this configuration is overridden by kis_wdg_generator.cpp line 165, which resets everything to defaultConfiguration(). Replacing this with configuration() hardcodes it to the last known preset, which is not the intended behaviour either.
Fun fact, that dialog was meant to be "temporary" when I created it 12 years ago...
Git commit 1789e06f81489d98838a4587dafe2cf123c7097d by Boudewijn Rempt. Committed on 23/06/2020 at 12:23. Pushed by rempt into branch 'krita/4.3'. Fill layers: Keep the config around when switching generators Ideally, though, we'd replace this dialog that meant to be temporary, in 2008, with something more solid... M +7 -5 libs/ui/dialogs/kis_dlg_generator_layer.cpp M +30 -18 libs/ui/widgets/kis_wdg_generator.cpp https://invent.kde.org/graphics/krita/commit/1789e06f81489d98838a4587dafe2cf123c7097d
Git commit f08c1fd15e636f17dab0cbc399c9f83cee4913c4 by Boudewijn Rempt. Committed on 23/06/2020 at 12:26. Pushed by rempt into branch 'amyspark/T13097-gsoc2020-seexpr'. Fill layers: Keep the config around when switching generators Ideally, though, we'd replace this dialog that meant to be temporary, in 2008, with something more solid... (cherry picked from commit 1789e06f81489d98838a4587dafe2cf123c7097d) M +7 -5 libs/ui/dialogs/kis_dlg_generator_layer.cpp M +30 -18 libs/ui/widgets/kis_wdg_generator.cpp https://invent.kde.org/graphics/krita/commit/f08c1fd15e636f17dab0cbc399c9f83cee4913c4
Git commit 5a6fbdd61e6293658140dcb8ee27993f88f67787 by Boudewijn Rempt. Committed on 23/06/2020 at 12:37. Pushed by rempt into branch 'master'. Fill layers: Keep the config around when switching generators Ideally, though, we'd replace this dialog that meant to be temporary, in 2008, with something more solid... (cherry picked from commit 1789e06f81489d98838a4587dafe2cf123c7097d) M +7 -5 libs/ui/dialogs/kis_dlg_generator_layer.cpp M +30 -18 libs/ui/widgets/kis_wdg_generator.cpp https://invent.kde.org/graphics/krita/commit/5a6fbdd61e6293658140dcb8ee27993f88f67787