mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
Feature/home page improve (#4602)
* Add new MyRRF custom printer * hide user panel when networking plugin is not installed/used * Fixed a bug that promption of installing plugin notification was not displayed when trying to switch to Bambu device tab * replay missing_connection animated image when switching to device tab
This commit is contained in:
parent
2d737f62b5
commit
1e08b855df
37 changed files with 710 additions and 814 deletions
|
@ -989,30 +989,6 @@ void MainFrame::init_tabpanel() {
|
|||
m_tabpanel->Hide();
|
||||
m_settings_dialog.set_tabpanel(m_tabpanel);
|
||||
|
||||
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGING, [this](wxBookCtrlEvent &e) {
|
||||
int old_sel = e.GetOldSelection();
|
||||
int new_sel = e.GetSelection();
|
||||
if (wxGetApp().preset_bundle && wxGetApp().preset_bundle->is_bbl_vendor() && new_sel == tpMonitor) {
|
||||
if (!wxGetApp().getAgent()) {
|
||||
e.Veto();
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("skipped tab switch from %1% to %2%, lack of network plugins") % old_sel % new_sel;
|
||||
if (m_plater) {
|
||||
wxCommandEvent *evt = new wxCommandEvent(EVT_INSTALL_PLUGIN_HINT);
|
||||
wxQueueEvent(m_plater, evt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (new_sel == tpMonitor && wxGetApp().preset_bundle != nullptr) {
|
||||
auto cfg = wxGetApp().preset_bundle->printers.get_edited_preset().config;
|
||||
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||
if (url.empty()) {
|
||||
wxString url = wxString::Format("file://%s/web/orca/missing_connection.html", from_u8(resources_dir()));
|
||||
m_printer_view->load_url(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
#ifdef __WXMSW__
|
||||
m_tabpanel->Bind(wxEVT_BOOKCTRL_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue