ENH: some improvements and fixs

1. create user folder if not exists
2. add a tips for binding a printer
3. fix sdcard tips
4. modify icons
5. refine layout of task options

Change-Id: Ic0529cf1e8bdde0128052bc42454f6e6aaae87ca
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li authored and Lane.Wei committed 2022-10-20 19:34:37 +08:00
1 parent 13b5e589cb
commit f968374b46
8 files changed
+41 -13

No files matched your search

+9
View File
@@ -252,6 +252,10 @@ PresetsConfigSubstitutions PresetBundle::load_presets(AppConfig &config, Forward
else {
dir_user_presets = data_dir() + "/" + PRESET_USER_DIR + "/default";
}
fs::path user_folder(data_dir() + "/" + PRESET_USER_DIR);
if (!fs::exists(user_folder))
fs::create_directory(user_folder);
fs::path folder(dir_user_presets);
if (!fs::exists(folder))
fs::create_directory(folder);
@@ -700,6 +704,11 @@ void PresetBundle::save_user_presets(AppConfig& config, std::vector<std::string>
const std::string dir_user_presets = data_dir() + "/" + PRESET_USER_DIR + "/"+ config.get("preset_folder");
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" enter, save to %1%")%dir_user_presets;
fs::path user_folder(data_dir() + "/" + PRESET_USER_DIR);
if (!fs::exists(user_folder))
fs::create_directory(user_folder);
fs::path folder(dir_user_presets);
if (!fs::exists(folder))
fs::create_directory(folder);