mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX:fixed color picker control cannot be clicked on Mac OS
Change-Id: I47ea257ced111c7d519c546375d3ba8b808f1d4e
This commit is contained in:
parent
713e346a11
commit
f5960411a3
3 changed files with 6 additions and 5 deletions
|
@ -671,7 +671,7 @@ void AMSMaterialsSetting::on_clr_picker(wxMouseEvent &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint img_pos = m_clr_picker->ClientToScreen(wxPoint(0, 0));
|
wxPoint img_pos = m_clr_picker->ClientToScreen(wxPoint(0, 0));
|
||||||
wxPoint popup_pos(img_pos.x + FromDIP(50), img_pos.y);
|
wxPoint popup_pos(img_pos.x - m_color_picker_popup.GetSize().x - FromDIP(95), img_pos.y - FromDIP(65));
|
||||||
m_color_picker_popup.Position(popup_pos, wxSize(0, 0));
|
m_color_picker_popup.Position(popup_pos, wxSize(0, 0));
|
||||||
m_color_picker_popup.set_ams_colours(ams_colors);
|
m_color_picker_popup.set_ams_colours(ams_colors);
|
||||||
m_color_picker_popup.set_def_colour(m_clr_picker->m_colour);
|
m_color_picker_popup.set_def_colour(m_clr_picker->m_colour);
|
||||||
|
|
|
@ -123,6 +123,7 @@ public:
|
||||||
wxColour m_brand_colour;
|
wxColour m_brand_colour;
|
||||||
std::string m_filament_type;
|
std::string m_filament_type;
|
||||||
ColorPickerPopup m_color_picker_popup;
|
ColorPickerPopup m_color_picker_popup;
|
||||||
|
ColorPicker * m_clr_picker;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void create_panel_normal(wxWindow* parent);
|
void create_panel_normal(wxWindow* parent);
|
||||||
|
@ -153,7 +154,6 @@ protected:
|
||||||
Button * m_button_confirm;
|
Button * m_button_confirm;
|
||||||
wxStaticText* m_tip_readonly;
|
wxStaticText* m_tip_readonly;
|
||||||
Button * m_button_close;
|
Button * m_button_close;
|
||||||
ColorPicker * m_clr_picker;
|
|
||||||
wxColourData * m_clrData;
|
wxColourData * m_clrData;
|
||||||
|
|
||||||
wxPanel * m_panel_kn;
|
wxPanel * m_panel_kn;
|
||||||
|
|
|
@ -2842,7 +2842,7 @@ void StatusPanel::on_ams_unload(SimpleEvent &event)
|
||||||
|
|
||||||
void StatusPanel::on_ams_filament_backup(SimpleEvent& event)
|
void StatusPanel::on_ams_filament_backup(SimpleEvent& event)
|
||||||
{
|
{
|
||||||
if (obj /*&& obj->filam_bak.size() > 0*/) {
|
if (obj && obj->filam_bak.size() > 0) {
|
||||||
AmsReplaceMaterialDialog* m_replace_material_popup = new AmsReplaceMaterialDialog(this);
|
AmsReplaceMaterialDialog* m_replace_material_popup = new AmsReplaceMaterialDialog(this);
|
||||||
m_replace_material_popup->update_machine_obj(obj);
|
m_replace_material_popup->update_machine_obj(obj);
|
||||||
m_replace_material_popup->ShowModal();
|
m_replace_material_popup->ShowModal();
|
||||||
|
@ -2968,13 +2968,15 @@ void StatusPanel::on_filament_edit(wxCommandEvent &event)
|
||||||
k_val = wxString::Format("%.3f", tray_it->second->k);
|
k_val = wxString::Format("%.3f", tray_it->second->k);
|
||||||
n_val = wxString::Format("%.3f", tray_it->second->n);
|
n_val = wxString::Format("%.3f", tray_it->second->n);
|
||||||
wxColor color = AmsTray::decode_color(tray_it->second->color);
|
wxColor color = AmsTray::decode_color(tray_it->second->color);
|
||||||
m_filament_setting_dlg->set_color(color);
|
//m_filament_setting_dlg->set_color(color);
|
||||||
|
|
||||||
std::vector<wxColour> cols;
|
std::vector<wxColour> cols;
|
||||||
for (auto col : tray_it->second->cols) {
|
for (auto col : tray_it->second->cols) {
|
||||||
cols.push_back( AmsTray::decode_color(col));
|
cols.push_back( AmsTray::decode_color(col));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_filament_setting_dlg->ams_filament_id = tray_it->second->setting_id;
|
||||||
|
|
||||||
if (m_filament_setting_dlg->ams_filament_id.empty()) {
|
if (m_filament_setting_dlg->ams_filament_id.empty()) {
|
||||||
m_filament_setting_dlg->set_empty_color(color);
|
m_filament_setting_dlg->set_empty_color(color);
|
||||||
}
|
}
|
||||||
|
@ -2982,7 +2984,6 @@ void StatusPanel::on_filament_edit(wxCommandEvent &event)
|
||||||
m_filament_setting_dlg->set_color(color);
|
m_filament_setting_dlg->set_color(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_filament_setting_dlg->ams_filament_id = tray_it->second->setting_id;
|
|
||||||
m_filament_setting_dlg->m_is_third = !MachineObject::is_bbl_filament(tray_it->second->tag_uid);
|
m_filament_setting_dlg->m_is_third = !MachineObject::is_bbl_filament(tray_it->second->tag_uid);
|
||||||
if (!m_filament_setting_dlg->m_is_third) {
|
if (!m_filament_setting_dlg->m_is_third) {
|
||||||
sn_number = tray_it->second->uuid;
|
sn_number = tray_it->second->uuid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue