mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 11:30:41 +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;
|
||||
// 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->load_default_url_delayed();
|
||||
}
|
||||
|
@ -380,8 +380,10 @@ void PresetComboBox::edit_physical_printer()
|
||||
|
||||
void PresetComboBox::add_physical_printer()
|
||||
{
|
||||
if (PhysicalPrinterDialog(this->GetParent(), wxEmptyString).ShowModal() == wxID_OK)
|
||||
if (PhysicalPrinterDialog(this->GetParent(), wxEmptyString).ShowModal() == wxID_OK) {
|
||||
update();
|
||||
wxGetApp().show_printer_webview_tab();
|
||||
}
|
||||
}
|
||||
|
||||
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"), "",
|
||||
[this](wxCommandEvent&) {
|
||||
PhysicalPrinterDialog dlg(this->GetParent(), wxEmptyString);
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
update();
|
||||
add_physical_printer();
|
||||
}, "edit_uni", menu, []() { return true; }, wxGetApp().plater());
|
||||
|
||||
wxGetApp().plater()->PopupMenu(menu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user