mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-26 04:12:07 +00:00
Refactor color blending logic in MixedFilamentConfigPanel: Improve the blend_from_sequence method to handle empty color and sequence inputs, optimize counting of color occurrences, and enhance the blending process. Introduce new helper functions for building entry preview sequences and computing display colors for mixed filaments, ensuring accurate color representation in the UI.
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
|
||||
// We are using quite an old TBB 2017 U7, which does not support global control API officially.
|
||||
@@ -343,7 +344,10 @@ void set_log_path_and_level(const std::string& file, unsigned int level)
|
||||
// Keep g_data_dir fallback for non-Windows or missing environment.
|
||||
boost::filesystem::path log_folder = boost::filesystem::path(g_data_dir) / "log";
|
||||
#ifdef _WIN32
|
||||
if (const char *local_appdata = std::getenv("LOCALAPPDATA"); local_appdata != nullptr && *local_appdata != '\0')
|
||||
// boost::filesystem is configured to interpret narrow paths as UTF-8.
|
||||
// On Windows, std::getenv() may return ANSI-encoded bytes, which breaks
|
||||
// non-ASCII profile paths (for example usernames containing umlauts).
|
||||
if (const char *local_appdata = boost::nowide::getenv("LOCALAPPDATA"); local_appdata != nullptr && *local_appdata != '\0')
|
||||
log_folder = boost::filesystem::path(local_appdata) / "Snapmaker_Orca" / "log";
|
||||
#endif
|
||||
if (!boost::filesystem::exists(log_folder)) {
|
||||
|
||||
Reference in New Issue
Block a user