@@ -1908,7 +1908,13 @@ macro(write_settings_file_header)
1908
1908
"\n "
1909
1909
" /// @{\n "
1910
1910
" /// @brief Initializes a new instance of the ${TARGET_DEFAULT_NAMESPACE} ::properties::settings class.\n "
1911
- " settings() noexcept = default;\n "
1911
+ " /// @remarks All properties are reloaded with the last saved value.\n "
1912
+ " settings() noexcept : settings {true} {}\n "
1913
+ " /// @brief Initializes a new instance of the ${TARGET_DEFAULT_NAMESPACE} ::properties::settings class.\n "
1914
+ " /// @param load If true all properties are reloaded with the last saved values; otherwise none.\n "
1915
+ " explicit settings(bool load) noexcept {\n "
1916
+ " if (load) reload();\n "
1917
+ " }\n "
1912
1918
" /// @}\n "
1913
1919
"\n "
1914
1920
" /// @cond\n "
@@ -1981,7 +1987,7 @@ macro(write_settings_file_header)
1981
1987
" /// @remarks See [Settings](https://gammasoft71.github.io/xtd/docs/documentation/Guides/xtd.core/settings) for more informations.\n "
1982
1988
" void reset() noexcept {\n "
1983
1989
" settings_.reset();\n "
1984
- " *this = settings {};\n "
1990
+ " *this = settings {false };\n "
1985
1991
" }\n "
1986
1992
"\n "
1987
1993
)
@@ -2009,11 +2015,9 @@ macro(write_settings_file_header)
2009
2015
" /// @{\n "
2010
2016
" /// @brief Gets the default instance of settings.\n "
2011
2017
" /// @return The default instance.\n "
2018
+ " /// @remarks At the first call all properties are reloaded with the last saved values.\n "
2012
2019
" static settings& default_settings() noexcept {\n "
2013
2020
" static auto default_settings = settings {};\n "
2014
- " call_once_ {\n "
2015
- " default_settings.reload();\n "
2016
- " };\n "
2017
2021
" return default_settings;\n "
2018
2022
" }\n "
2019
2023
" /// @}\n "
0 commit comments