FIX:Only one of the two dialogs is displayed
jira: STUDIO-10065 Change-Id: I7763de83697ea9645808757b9396acd34cd12cca
This commit is contained in:
parent
90d8a136f9
commit
eab6384c6c
|
@ -3025,7 +3025,10 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||
temp_fsa_info.dialog_pos.x = same_dialog_pos_x;
|
||||
temp_fsa_info.dialog_pos.y = small_btn_pt.y;
|
||||
if (m_fna_dialog) {
|
||||
m_fna_dialog.reset();
|
||||
if (m_sna_dialog) {
|
||||
m_sna_dialog->on_hide();
|
||||
}
|
||||
m_fna_dialog.reset();
|
||||
}
|
||||
m_fna_dialog = std::make_shared<FinishSyncAmsDialog>(this, temp_fsa_info);
|
||||
m_fna_dialog->Show();
|
||||
|
@ -3127,7 +3130,12 @@ void Sidebar::pop_sync_nozzle_and_ams_ialog() {
|
|||
int same_dialog_pos_x = get_sidebar_pos_right_x() + FromDIP(5);
|
||||
temp_na_info.dialog_pos.x = same_dialog_pos_x;
|
||||
temp_na_info.dialog_pos.y += FromDIP(2);
|
||||
if (m_sna_dialog) { m_sna_dialog.reset(); }
|
||||
if (m_sna_dialog) {
|
||||
if (m_fna_dialog) {
|
||||
m_fna_dialog->on_hide();
|
||||
}
|
||||
m_sna_dialog.reset();
|
||||
}
|
||||
m_sna_dialog = std::make_shared<SyncNozzleAndAmsDialog>(this, temp_na_info);
|
||||
m_sna_dialog->Show();
|
||||
m_sna_dialog->Raise();
|
||||
|
|
|
@ -4368,7 +4368,7 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(wxWindow *parent, InputInfo &inpu
|
|||
//SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
|
||||
SetTransparent(220);
|
||||
SetBackgroundColour(wxColour(23, 25, 22, 128));
|
||||
auto win_width = 288;
|
||||
auto win_width = 300;
|
||||
SetMinSize(wxSize(FromDIP(win_width), -1));
|
||||
SetMaxSize(wxSize(FromDIP(win_width), -1));
|
||||
SetPosition(m_input_info.dialog_pos);
|
||||
|
@ -4384,12 +4384,12 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(wxWindow *parent, InputInfo &inpu
|
|||
text_sizer->Add(image_sizer);
|
||||
text_sizer->AddSpacer(FromDIP(5));
|
||||
auto finish_text = new Label(this, _L("Successfully synchronized nozzle and AMS number information."), LB_AUTO_WRAP);
|
||||
finish_text->SetMinSize(wxSize(FromDIP(win_width - 40), -1));
|
||||
finish_text->SetMaxSize(wxSize(FromDIP(win_width - 40), -1));
|
||||
finish_text->SetMinSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
finish_text->SetMaxSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
|
||||
text_sizer->Add(finish_text, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(20));
|
||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(15));
|
||||
|
||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||
|
@ -4473,7 +4473,7 @@ FinishSyncAmsDialog::FinishSyncAmsDialog(wxWindow *parent, InputInfo &input_info
|
|||
// SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
|
||||
SetTransparent(220);
|
||||
SetBackgroundColour(wxColour(23, 25, 22, 128));
|
||||
auto win_width = 288;
|
||||
auto win_width = 300;
|
||||
SetMinSize(wxSize(FromDIP(win_width), -1));
|
||||
SetMaxSize(wxSize(FromDIP(win_width), -1));
|
||||
SetPosition(m_input_info.dialog_pos);
|
||||
|
@ -4489,12 +4489,12 @@ FinishSyncAmsDialog::FinishSyncAmsDialog(wxWindow *parent, InputInfo &input_info
|
|||
text_sizer->Add(image_sizer);
|
||||
text_sizer->AddSpacer(FromDIP(5));
|
||||
auto finish_text = new Label(this, _L("Successfully synchronized color and type of filament from printer."), LB_AUTO_WRAP);
|
||||
finish_text->SetMinSize(wxSize(FromDIP(win_width - 40), -1));
|
||||
finish_text->SetMaxSize(wxSize(FromDIP(win_width - 40), -1));
|
||||
finish_text->SetMinSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
finish_text->SetMaxSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
|
||||
text_sizer->Add(finish_text, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(20));
|
||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(15));
|
||||
|
||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||
|
|
Loading…
Reference in New Issue