mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-04 05:50:47 +08:00
Merge branch 'ys_spe2210_11_16':
- SPE-2210 - SPE-2211 - missing menu item in GCodeViewer - showing of Physical Printer tab None of the issues were in a public release.
This commit is contained in:
commit
f769db569f
@ -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();
|
||||
}
|
||||
@ -1187,8 +1187,10 @@ void MainFrame::on_sys_color_changed()
|
||||
for (auto tab : wxGetApp().tabs_list)
|
||||
tab->sys_color_changed();
|
||||
|
||||
m_connect_webview->sys_color_changed();
|
||||
m_printer_webview->sys_color_changed();
|
||||
if (m_connect_webview)
|
||||
m_connect_webview->sys_color_changed();
|
||||
if (m_printer_webview)
|
||||
m_printer_webview->sys_color_changed();
|
||||
|
||||
MenuFactory::sys_color_changed(m_menubar);
|
||||
|
||||
@ -1749,7 +1751,7 @@ void MainFrame::init_menubar_as_gcodeviewer()
|
||||
m_menubar->Append(fileMenu, _L("&File"));
|
||||
if (viewMenu != nullptr) m_menubar->Append(viewMenu, _L("&View"));
|
||||
// Add additional menus from C++
|
||||
// wxGetApp().add_config_menu(m_menubar);
|
||||
m_menubar->Append(wxGetApp().get_config_menu(), _L("&Configuration"));
|
||||
m_menubar->Append(helpMenu, _L("&Help"));
|
||||
SetMenuBar(m_menubar);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -493,7 +493,9 @@ void TopBarItemsCtrl::RemovePage(size_t n)
|
||||
ScalableButton* btn = m_pageButtons[n];
|
||||
m_pageButtons.erase(m_pageButtons.begin() + n);
|
||||
m_buttons_sizer->Remove(n);
|
||||
btn->Reparent(nullptr);
|
||||
|
||||
// Under OSX call of btn->Reparent(nullptr) causes a crash, so as a workaround use RemoveChild() instead
|
||||
this->RemoveChild(btn);
|
||||
btn->Destroy();
|
||||
m_sizer->Layout();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user