mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-18 22:31:13 -06:00
NEW: add confirm dialog after check conditions
confirm to check printer model and slice warnings Change-Id: I07a272fda1a5e2ebc0f4e106815fe07da5aaa4df Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
a84cf46699
commit
ee62ffcc7d
10 changed files with 124 additions and 6 deletions
|
@ -16,6 +16,9 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
// slice warnings enum strings
|
||||
#define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament"
|
||||
|
||||
enum class EMoveType : unsigned char
|
||||
{
|
||||
Noop,
|
||||
|
@ -128,6 +131,14 @@ namespace Slic3r {
|
|||
}
|
||||
};
|
||||
|
||||
struct SliceWarnings {
|
||||
int level; // 0: normal tips, 1: warning; 2: error
|
||||
std::string msg; // enum string
|
||||
std::vector<std::string> params; // extra msg info
|
||||
};
|
||||
|
||||
std::vector<SliceWarnings> warnings;
|
||||
|
||||
std::string filename;
|
||||
unsigned int id;
|
||||
std::vector<MoveVertex> moves;
|
||||
|
|
|
@ -644,6 +644,24 @@ std::string Preset::get_filament_type(std::string &display_filament_type)
|
|||
return config.get_filament_type(display_filament_type);
|
||||
}
|
||||
|
||||
std::string Preset::get_printer_type(PresetBundle *preset_bundle)
|
||||
{
|
||||
if (preset_bundle) {
|
||||
auto config = &preset_bundle->printers.get_edited_preset().config;
|
||||
std::string vendor_name;
|
||||
for (auto vendor_profile : preset_bundle->vendors) {
|
||||
for (auto vendor_model : vendor_profile.second.models)
|
||||
if (vendor_model.name == config->opt_string("printer_model"))
|
||||
{
|
||||
vendor_name = vendor_profile.first;
|
||||
return vendor_model.model_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
bool Preset::is_bbl_vendor_preset(PresetBundle *preset_bundle)
|
||||
{
|
||||
bool is_bbl_vendor_preset = true;
|
||||
|
|
|
@ -296,8 +296,9 @@ public:
|
|||
|
||||
// special for upport G and Support W
|
||||
std::string get_filament_type(std::string &display_filament_type);
|
||||
std::string get_printer_type(PresetBundle *preset_bundle);
|
||||
|
||||
bool is_bbl_vendor_preset(PresetBundle *m_preset_bundle);
|
||||
bool is_bbl_vendor_preset(PresetBundle *preset_bundle);
|
||||
|
||||
static const std::vector<std::string>& print_options();
|
||||
static const std::vector<std::string>& filament_options();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue