FIX:change control for two dialog
jira: STUDIO-10038 Change-Id: Ia88ebc9c5a61920108cdec2ae33fdf73cf6e0b00
This commit is contained in:
parent
17dddbdccc
commit
4c9d891700
|
@ -2801,10 +2801,17 @@ void Sidebar::update_sync_status(const MachineObject *obj)
|
|||
p->update_sync_status(obj);
|
||||
}
|
||||
|
||||
void Sidebar::get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size) {
|
||||
int Sidebar::get_sidebar_pos_right_x()
|
||||
{
|
||||
return this->GetScreenPosition().x + this->GetSize().x;
|
||||
}
|
||||
|
||||
void Sidebar::get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size)
|
||||
{
|
||||
size =btn_sync->GetSize();
|
||||
pt = btn_sync->GetScreenPosition();
|
||||
}
|
||||
|
||||
void Sidebar::get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size) {
|
||||
size = ams_btn->GetSize();
|
||||
pt = ams_btn->GetScreenPosition();
|
||||
|
@ -2858,13 +2865,8 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||
}
|
||||
wxGetApp().plater()->update_all_plate_thumbnails(true);//preview thumbnail for sync_dlg
|
||||
SyncAmsInfoDialog::SyncInfo temp_info;
|
||||
temp_info.use_dialog_pos = true;
|
||||
temp_info.use_dialog_pos = false;
|
||||
temp_info.cancel_text_to_later = is_from_big_sync_btn;
|
||||
wxPoint small_btn_pt;
|
||||
wxSize small_btn_size;
|
||||
get_small_btn_sync_pos_size(small_btn_pt, small_btn_size);
|
||||
auto cur_dialog_pos = small_btn_pt + wxPoint(small_btn_size.x * 3.6 + 5, 0);
|
||||
temp_info.dialog_pos = cur_dialog_pos;
|
||||
temp_info.connected_printer = true;
|
||||
SyncAmsInfoDialog sync_dlg(this, temp_info);
|
||||
int dlg_res{(int) wxID_CANCEL};
|
||||
|
@ -3014,8 +3016,14 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||
}
|
||||
Layout();
|
||||
|
||||
wxPoint small_btn_pt;
|
||||
wxSize small_btn_size;
|
||||
get_small_btn_sync_pos_size(small_btn_pt, small_btn_size);
|
||||
|
||||
FinishSyncAmsDialog::InputInfo temp_fsa_info;
|
||||
temp_fsa_info.dialog_pos = cur_dialog_pos;
|
||||
auto same_dialog_pos_x = get_sidebar_pos_right_x() + FromDIP(5);
|
||||
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();
|
||||
}
|
||||
|
@ -3111,11 +3119,8 @@ void Sidebar::deal_btn_sync() {
|
|||
wxGetApp().plater()->sidebar().get_big_btn_sync_pos_size(big_btn_pt, big_btn_size);
|
||||
temp_na_info.dialog_pos = big_btn_pt + wxPoint(big_btn_size.x, big_btn_size.y) + wxPoint(FromDIP(big_btn_size.x / 10.f - 5), FromDIP(big_btn_size.y / 10.f));
|
||||
|
||||
wxPoint small_btn_pt;
|
||||
wxSize small_btn_size;
|
||||
get_small_btn_sync_pos_size(small_btn_pt, small_btn_size);
|
||||
auto cur_dialog_pos = small_btn_pt + wxPoint(small_btn_size.x * 3.6 + 5, 0);
|
||||
temp_na_info.dialog_pos.x = cur_dialog_pos.x;
|
||||
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);
|
||||
temp_na_info.only_external_material = only_external_material;
|
||||
if (m_sna_dialog) {
|
||||
|
|
|
@ -165,6 +165,7 @@ public:
|
|||
bool sync_extruder_list();
|
||||
bool need_auto_sync_extruder_list_after_connect_priner(const MachineObject* obj);
|
||||
void update_sync_status(const MachineObject* obj);
|
||||
int get_sidebar_pos_right_x();
|
||||
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||
|
||||
|
|
|
@ -4384,8 +4384,9 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(wxWindow *parent, InputInfo &inpu
|
|||
image_sizer->AddStretchSpacer();
|
||||
text_sizer->Add(image_sizer);
|
||||
text_sizer->AddSpacer(FromDIP(5));
|
||||
auto finish_text = new wxStaticText(this, wxID_ANY, _L("Successfully synchronized nozzle and AMS number information."));
|
||||
finish_text->Wrap(win_width - 40);
|
||||
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->SetForegroundColour(wxColour(255, 255, 255, 255));
|
||||
text_sizer->Add(finish_text, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
|
@ -4488,8 +4489,9 @@ FinishSyncAmsDialog::FinishSyncAmsDialog(wxWindow *parent, InputInfo &input_info
|
|||
image_sizer->AddStretchSpacer();
|
||||
text_sizer->Add(image_sizer);
|
||||
text_sizer->AddSpacer(FromDIP(5));
|
||||
auto finish_text = new wxStaticText(this, wxID_ANY, _L("Successfully synchronized color and type of filament from printer."));
|
||||
finish_text->Wrap(win_width - 40);
|
||||
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->SetForegroundColour(wxColour(255, 255, 255, 255));
|
||||
text_sizer->Add(finish_text, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
|
|
Loading…
Reference in New Issue