FIX:modify text and fix show bug of SyncAmsInfoDialog
jira: STUDIO-9974 Change-Id: Id10dd54bc23e98cd709860b563fc26b4c570b98f
This commit is contained in:
parent
4a01c840ab
commit
c3990592ac
|
@ -505,8 +505,8 @@ void MaterialSyncItem::doRender(wxDC &dc)
|
|||
//not draw m_ams_not_match
|
||||
}
|
||||
|
||||
AmsMapingPopup::AmsMapingPopup(wxWindow *parent)
|
||||
: PopupWindow(parent, wxBORDER_NONE)
|
||||
AmsMapingPopup::AmsMapingPopup(wxWindow *parent, bool use_in_sync_dialog) :
|
||||
PopupWindow(parent, wxBORDER_NONE), m_use_in_sync_dialog(use_in_sync_dialog)
|
||||
{
|
||||
Bind(wxEVT_PAINT, &AmsMapingPopup::paintEvent, this);
|
||||
|
||||
|
@ -571,19 +571,17 @@ AmsMapingPopup::AmsMapingPopup(wxWindow *parent)
|
|||
m_right_extra_slot->SetMinSize(wxSize(FromDIP(48), FromDIP(60)));
|
||||
m_right_extra_slot->SetMaxSize(wxSize(FromDIP(48), FromDIP(60)));
|
||||
|
||||
auto left_tips = new Label(m_left_marea_panel);
|
||||
left_tips->SetForegroundColour(0x262E30);
|
||||
left_tips->SetBackgroundColour(*wxWHITE);
|
||||
left_tips->SetFont(::Label::Body_13);
|
||||
left_tips->SetLabel(_L("Select filament that installed to the left nozzle"));
|
||||
m_single_tip_text = _L("Please select from the following filaments");
|
||||
m_left_tip_text = _L("Select filament that installed to the left nozzle");
|
||||
m_right_tip_text = _L("Select filament that installed to the right nozzle");
|
||||
|
||||
auto right_tips = new Label(m_right_marea_panel);
|
||||
right_tips->SetForegroundColour(0x262E30);
|
||||
right_tips->SetBackgroundColour(*wxWHITE);
|
||||
right_tips->SetFont(::Label::Body_13);
|
||||
right_tips->SetLabel(_L("Select filament that installed to the right nozzle"));
|
||||
m_left_tips = new Label(m_left_marea_panel);
|
||||
m_left_tips->SetForegroundColour(0x262E30);
|
||||
m_left_tips->SetBackgroundColour(*wxWHITE);
|
||||
m_left_tips->SetFont(::Label::Body_13);
|
||||
m_left_tips->SetLabel(m_left_tip_text);
|
||||
|
||||
m_sizer_ams_left->Add(left_tips, 0, wxEXPAND|wxBOTTOM, FromDIP(8));
|
||||
m_sizer_ams_left->Add(m_left_tips, 0, wxEXPAND | wxBOTTOM, FromDIP(8));
|
||||
m_left_split_ams_sizer = create_split_sizer(m_left_marea_panel, _L("Left AMS"));
|
||||
m_sizer_ams_left->Add(m_left_split_ams_sizer, 0, wxEXPAND, 0);
|
||||
m_sizer_ams_left->Add(m_sizer_ams_basket_left, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
|
@ -591,7 +589,12 @@ AmsMapingPopup::AmsMapingPopup(wxWindow *parent)
|
|||
//m_sizer_ams_left->Add(m_left_extra_slot, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
m_sizer_ams_left->Add(sizer_temp, 0, wxEXPAND | wxTOP, FromDIP(8));
|
||||
|
||||
m_sizer_ams_right->Add(right_tips, 0, wxEXPAND|wxBOTTOM, FromDIP(8));
|
||||
m_right_tips = new Label(m_right_marea_panel);
|
||||
m_right_tips->SetForegroundColour(0x262E30);
|
||||
m_right_tips->SetBackgroundColour(*wxWHITE);
|
||||
m_right_tips->SetFont(::Label::Body_13);
|
||||
m_right_tips->SetLabel(m_right_tip_text);
|
||||
m_sizer_ams_right->Add(m_right_tips, 0, wxEXPAND | wxBOTTOM, FromDIP(8));
|
||||
m_right_split_ams_sizer = create_split_sizer(m_right_marea_panel, _L("Right AMS"));
|
||||
m_sizer_ams_right->Add(m_right_split_ams_sizer, 0, wxEXPAND, 0);
|
||||
m_sizer_ams_right->Add(m_sizer_ams_basket_right, 0, wxEXPAND|wxTOP, FromDIP(8));
|
||||
|
@ -770,6 +773,7 @@ void AmsMapingPopup::update(MachineObject* obj)
|
|||
//m_left_marea_panel->Show();
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("AMS"));
|
||||
m_right_tips->SetLabel(m_single_tip_text);
|
||||
m_right_extra_slot->Show();
|
||||
}
|
||||
else if (nozzle_nums > 1) {
|
||||
|
@ -777,16 +781,26 @@ void AmsMapingPopup::update(MachineObject* obj)
|
|||
m_right_marea_panel->Hide();
|
||||
m_left_extra_slot->Hide();
|
||||
m_right_extra_slot->Hide();
|
||||
m_left_tips->SetLabel(m_left_tip_text);
|
||||
m_right_tips->SetLabel(m_right_tip_text);
|
||||
if (m_show_type == ShowType::LEFT)
|
||||
{
|
||||
m_left_marea_panel->Show();
|
||||
m_left_extra_slot->Show();
|
||||
if (m_use_in_sync_dialog) {
|
||||
m_left_tips->SetLabel(m_single_tip_text);
|
||||
m_right_tips->SetLabel("");
|
||||
}
|
||||
}
|
||||
else if (m_show_type == ShowType::RIGHT)
|
||||
{
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right AMS"));
|
||||
m_right_extra_slot->Show();
|
||||
if (m_use_in_sync_dialog) {
|
||||
m_right_tips->SetLabel(m_single_tip_text);
|
||||
m_left_tips->SetLabel("");
|
||||
}
|
||||
}
|
||||
else if (m_show_type == ShowType::LEFT_AND_RIGHT)
|
||||
{
|
||||
|
@ -796,6 +810,10 @@ void AmsMapingPopup::update(MachineObject* obj)
|
|||
m_left_extra_slot->Show();
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("Right AMS"));
|
||||
if (m_use_in_sync_dialog) {
|
||||
m_left_tips->SetLabel(m_left_tip_text);
|
||||
m_right_tips->SetLabel("");
|
||||
}
|
||||
m_right_extra_slot->Show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,8 +163,10 @@ public:
|
|||
|
||||
class AmsMapingPopup : public PopupWindow
|
||||
{
|
||||
bool m_use_in_sync_dialog = false;
|
||||
|
||||
public:
|
||||
AmsMapingPopup(wxWindow *parent);
|
||||
AmsMapingPopup(wxWindow *parent,bool use_in_sync_dialog = false);
|
||||
~AmsMapingPopup() {};
|
||||
|
||||
wxWindow* send_win{ nullptr };
|
||||
|
@ -195,7 +197,11 @@ public:
|
|||
wxPanel* m_right_marea_panel;
|
||||
wxBoxSizer * m_left_split_ams_sizer{nullptr};
|
||||
wxBoxSizer * m_right_split_ams_sizer{nullptr};
|
||||
|
||||
Label * m_left_tips{nullptr};
|
||||
Label * m_right_tips{nullptr};
|
||||
wxString m_single_tip_text;
|
||||
wxString m_left_tip_text;
|
||||
wxString m_right_tip_text;
|
||||
wxBoxSizer* m_sizer_split_ams_left;
|
||||
wxBoxSizer* m_sizer_split_ams_right;
|
||||
|
||||
|
|
|
@ -102,9 +102,11 @@ bool SyncAmsInfoDialog::Show(bool show)
|
|||
}
|
||||
if (!m_input_info.connected_printer) {
|
||||
m_button_cancel->Hide();
|
||||
m_two_thumbnail_panel->Hide();
|
||||
m_confirm_title->Show();
|
||||
m_confirm_title->SetLabel(_L("Printer not connected. Please connect or choose a printer on the Device page and try again."));
|
||||
} else if (dirty_filament) {
|
||||
m_two_thumbnail_panel->Hide();
|
||||
m_confirm_title->Show();
|
||||
m_confirm_title->SetLabel(_L("Synchronizing AMS filaments will discard your modified but unsaved filament presets.\nAre you sure you want to continue?"));
|
||||
} else if (!m_check_dirty_fialment) {
|
||||
|
@ -117,8 +119,6 @@ bool SyncAmsInfoDialog::Show(bool show)
|
|||
}
|
||||
m_confirm_title->SetLabel(m_undone_str);
|
||||
}
|
||||
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
CenterOnParent();
|
||||
|
@ -428,9 +428,7 @@ void SyncAmsInfoDialog::show_color_panel(bool flag, bool update_layout)
|
|||
{
|
||||
//show_sizer(m_plate_combox_sizer, flag);
|
||||
m_filament_panel->Show(flag); // empty_project
|
||||
|
||||
m_attention_text->Show(flag);
|
||||
m_tip_text->Show(flag);
|
||||
show_ams_controls(flag);
|
||||
show_advanced_settings(flag);
|
||||
m_confirm_title->Show(flag);
|
||||
m_are_you_sure_title->Show(flag);
|
||||
|
@ -634,7 +632,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
|||
DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, _L("Synchronize AMS Filament Information"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
, m_input_info(info)
|
||||
, m_export_3mf_cancel(false)
|
||||
, m_mapping_popup(AmsMapingPopup(this))
|
||||
, m_mapping_popup(AmsMapingPopup(this,true))
|
||||
, m_mapping_tip_popup(AmsMapingTipPopup(this))
|
||||
, m_mapping_tutorial_popup(AmsTutorialPopup(this))
|
||||
{
|
||||
|
@ -4150,6 +4148,7 @@ void SyncAmsInfoDialog::show_ams_controls(bool flag)
|
|||
{
|
||||
m_filament_panel->Show(flag);
|
||||
m_attention_text->Show(flag);
|
||||
m_tip_text->Show(flag);
|
||||
}
|
||||
|
||||
void SyncAmsInfoDialog::update_thumbnail_data_accord_plate_index(bool allow_clone_ams_color)
|
||||
|
|
Loading…
Reference in New Issue