ENH:add "pop_sync_nozzle_and_ams_ialog" api
jira: STUDIO-10016 Change-Id: I000fa5719cf631ff0c63b6379850e1915f78ddaa
This commit is contained in:
parent
dde0b56e67
commit
170687352e
|
@ -3113,23 +3113,24 @@ void Sidebar::deal_btn_sync() {
|
||||||
bool only_external_material;
|
bool only_external_material;
|
||||||
auto ok = p->sync_extruder_list(only_external_material);
|
auto ok = p->sync_extruder_list(only_external_material);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
pop_sync_nozzle_and_ams_ialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Sidebar::pop_sync_nozzle_and_ams_ialog() {
|
||||||
SyncNozzleAndAmsDialog::InputInfo temp_na_info;
|
SyncNozzleAndAmsDialog::InputInfo temp_na_info;
|
||||||
wxPoint big_btn_pt;
|
wxPoint big_btn_pt;
|
||||||
wxSize big_btn_size;
|
wxSize big_btn_size;
|
||||||
wxGetApp().plater()->sidebar().get_big_btn_sync_pos_size(big_btn_pt, big_btn_size);
|
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));
|
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));
|
||||||
|
|
||||||
int same_dialog_pos_x = get_sidebar_pos_right_x()+ FromDIP(5);
|
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.x = same_dialog_pos_x;
|
||||||
temp_na_info.dialog_pos.y += FromDIP(2);
|
temp_na_info.dialog_pos.y += FromDIP(2);
|
||||||
temp_na_info.only_external_material = only_external_material;
|
if (m_sna_dialog) { m_sna_dialog.reset(); }
|
||||||
if (m_sna_dialog) {
|
|
||||||
m_sna_dialog.reset();
|
|
||||||
}
|
|
||||||
m_sna_dialog = std::make_shared<SyncNozzleAndAmsDialog>(this, temp_na_info);
|
m_sna_dialog = std::make_shared<SyncNozzleAndAmsDialog>(this, temp_na_info);
|
||||||
m_sna_dialog->Show();
|
m_sna_dialog->Show();
|
||||||
m_sna_dialog->Raise();
|
m_sna_dialog->Raise();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::vector<Search::InputInfo> get_search_inputs(ConfigOptionMode mode)
|
static std::vector<Search::InputInfo> get_search_inputs(ConfigOptionMode mode)
|
||||||
|
@ -10734,7 +10735,10 @@ int Plater::load_project(wxString const &filename2,
|
||||||
|
|
||||||
// only pop up in 3mf
|
// only pop up in 3mf
|
||||||
if (!this->m_exported_file && !this->m_only_gcode){
|
if (!this->m_exported_file && !this->m_only_gcode){
|
||||||
try_sync_preset_with_connected_printer();
|
auto ok = try_sync_preset_with_connected_printer();
|
||||||
|
if (ok) {
|
||||||
|
sidebar().pop_sync_nozzle_and_ams_ialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return wx_dlg_id;
|
return wx_dlg_id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,6 +191,7 @@ public:
|
||||||
bool get_eject_shown() const;
|
bool get_eject_shown() const;
|
||||||
bool is_multifilament();
|
bool is_multifilament();
|
||||||
void deal_btn_sync();
|
void deal_btn_sync();
|
||||||
|
void pop_sync_nozzle_and_ams_ialog();
|
||||||
void update_mode();
|
void update_mode();
|
||||||
bool is_collapsed();
|
bool is_collapsed();
|
||||||
void collapse(bool collapse);
|
void collapse(bool collapse);
|
||||||
|
|
Loading…
Reference in New Issue