mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-06-05 15:20:48 -07:00
PhysicalPrinters improvements:
- Added possibility to correct delete presets considering with the physical printers - Smart switching to the printer preset if physical printer was selected
This commit is contained in:
@@ -166,7 +166,7 @@ class TabPresetComboBox : public PresetComboBox
|
||||
bool show_incompatible {false};
|
||||
bool m_enable_all {false};
|
||||
|
||||
std::function<void(std::string)> update_ph_printers { nullptr };
|
||||
bool m_allow_to_update_physical_printers {false};
|
||||
|
||||
public:
|
||||
TabPresetComboBox(wxWindow *parent, Preset::Type preset_type);
|
||||
@@ -174,8 +174,8 @@ public:
|
||||
void set_show_incompatible_presets(bool show_incompatible_presets) {
|
||||
show_incompatible = show_incompatible_presets;
|
||||
}
|
||||
void set_update_physical_printers_function(std::function<void(std::string)> update_fn) {
|
||||
update_ph_printers = update_fn;
|
||||
void allow_to_update_physical_printers() {
|
||||
m_allow_to_update_physical_printers = m_type == Preset::TYPE_PRINTER;
|
||||
}
|
||||
|
||||
void update() override;
|
||||
@@ -263,6 +263,32 @@ protected:
|
||||
void on_sys_color_changed() override {};
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
// ChangePresetForPhysicalPrinterDialog
|
||||
//------------------------------------------------
|
||||
|
||||
class ChangePresetForPhysicalPrinterDialog : public DPIDialog
|
||||
{
|
||||
void OnOK(wxEvent& event);
|
||||
|
||||
public:
|
||||
|
||||
enum SelectionType
|
||||
{
|
||||
Switch,
|
||||
ChangePreset,
|
||||
AddPreset
|
||||
} m_selection {Switch};
|
||||
|
||||
ChangePresetForPhysicalPrinterDialog(const std::string& preset_name);
|
||||
~ChangePresetForPhysicalPrinterDialog() {}
|
||||
|
||||
protected:
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
void on_sys_color_changed() override {};
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
|
||||
Reference in New Issue
Block a user