mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-03 15:40:38 +08:00
Fixed show "Physical Printer" tab in TopBar after adding of the physical printer
This commit is contained in:
parent
a672b9587c
commit
22d3ad6590
@ -887,7 +887,7 @@ void MainFrame::add_printer_webview_tab(const wxString& url)
|
|||||||
}
|
}
|
||||||
m_printer_webview_added = true;
|
m_printer_webview_added = true;
|
||||||
// add as the last (rightmost) panel
|
// add as the last (rightmost) panel
|
||||||
dynamic_cast<TopBar*>(m_tabpanel)->AddPage(m_printer_webview, L"Physical Printer", "", false);
|
dynamic_cast<TopBar*>(m_tabpanel)->AddPage(m_printer_webview, _L("Physical Printer"), "", false);
|
||||||
m_printer_webview->set_default_url(url);
|
m_printer_webview->set_default_url(url);
|
||||||
m_printer_webview->load_default_url_delayed();
|
m_printer_webview->load_default_url_delayed();
|
||||||
}
|
}
|
||||||
|
@ -380,8 +380,10 @@ void PresetComboBox::edit_physical_printer()
|
|||||||
|
|
||||||
void PresetComboBox::add_physical_printer()
|
void PresetComboBox::add_physical_printer()
|
||||||
{
|
{
|
||||||
if (PhysicalPrinterDialog(this->GetParent(), wxEmptyString).ShowModal() == wxID_OK)
|
if (PhysicalPrinterDialog(this->GetParent(), wxEmptyString).ShowModal() == wxID_OK) {
|
||||||
update();
|
update();
|
||||||
|
wxGetApp().show_printer_webview_tab();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresetComboBox::open_physical_printer_url()
|
void PresetComboBox::open_physical_printer_url()
|
||||||
@ -782,9 +784,7 @@ void PlaterPresetComboBox::show_add_menu()
|
|||||||
|
|
||||||
append_menu_item(menu, wxID_ANY, _L("Add physical printer"), "",
|
append_menu_item(menu, wxID_ANY, _L("Add physical printer"), "",
|
||||||
[this](wxCommandEvent&) {
|
[this](wxCommandEvent&) {
|
||||||
PhysicalPrinterDialog dlg(this->GetParent(), wxEmptyString);
|
add_physical_printer();
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
|
||||||
update();
|
|
||||||
}, "edit_uni", menu, []() { return true; }, wxGetApp().plater());
|
}, "edit_uni", menu, []() { return true; }, wxGetApp().plater());
|
||||||
|
|
||||||
wxGetApp().plater()->PopupMenu(menu);
|
wxGetApp().plater()->PopupMenu(menu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user