mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
ENH: config: add default_nozzle_volume_type in printer
1. also remove original nozzle_volume_type from printer and move into project config 2. support save nozzle_volume_type into appconfig and load from it at beginning or printer switch jira: no-jira Change-Id: I01fc82d142fc633fc59a238796a71b9f8d180efb (cherry picked from commit fe8b904e7551cde83b1ead75922e9b60278b50ad)
This commit is contained in:
@@ -94,7 +94,7 @@ public:
|
||||
if (it == m_storage.end())
|
||||
return false;
|
||||
auto it2 = it->second.find(key);
|
||||
if (it2 == it->second.end())
|
||||
if (it2 == it->second.end())
|
||||
return false;
|
||||
value = it2->second;
|
||||
return true;
|
||||
@@ -280,6 +280,10 @@ public:
|
||||
|
||||
void save_custom_color_to_config(const std::vector<std::string> &colors);
|
||||
std::vector<std::string> get_custom_color_from_config();
|
||||
|
||||
void save_nozzle_volume_types_to_config(const std::string& printer_name, const std::string& nozzle_volume_types);
|
||||
std::string get_nozzle_volume_types_from_config(const std::string& printer_name);
|
||||
|
||||
// reset the current print / filament / printer selections, so that
|
||||
// the PresetBundle::load_selections(const AppConfig &config) call will select
|
||||
// the first non-default preset when called.
|
||||
@@ -345,7 +349,7 @@ public:
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
bool get_3dmouse_device_numeric_value(const std::string &device_name, const char *parameter_name, T &out) const
|
||||
bool get_3dmouse_device_numeric_value(const std::string &device_name, const char *parameter_name, T &out) const
|
||||
{
|
||||
std::string key = std::string("mouse_device:") + device_name;
|
||||
auto it = m_storage.find(key);
|
||||
|
||||
Reference in New Issue
Block a user