mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
NEW:add model mall system
Change-Id: Iccfe460cd7bfd11d91cdd7eddf142a8590e3c5b0
This commit is contained in:
parent
35edf03eca
commit
407d1faf0d
16 changed files with 630 additions and 21 deletions
|
@ -251,11 +251,11 @@ void BBLTopbar::Init(wxFrame* parent)
|
|||
this->AddStretchSpacer(1);
|
||||
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
/*wxBitmap m_publish_bitmap = create_scaled_bitmap("topbar_publish", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxBitmap m_publish_bitmap = create_scaled_bitmap("topbar_publish", nullptr, TOPBAR_ICON_SIZE);
|
||||
m_publish_item = this->AddTool(ID_PUBLISH, "", m_publish_bitmap);
|
||||
wxBitmap m_publish_disable_bitmap = create_scaled_bitmap("topbar_publish_disable", nullptr, TOPBAR_ICON_SIZE);
|
||||
m_publish_item->SetDisabledBitmap(m_publish_disable_bitmap);
|
||||
this->AddSpacer(FromDIP(12));*/
|
||||
this->AddSpacer(FromDIP(12));
|
||||
#endif
|
||||
|
||||
/*wxBitmap model_store_bitmap = create_scaled_bitmap("topbar_store", nullptr, TOPBAR_ICON_SIZE);
|
||||
|
@ -310,7 +310,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
|||
this->Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, &BBLTopbar::OnRedo, this, wxID_REDO);
|
||||
this->Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, &BBLTopbar::OnUndo, this, wxID_UNDO);
|
||||
//this->Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, &BBLTopbar::OnModelStoreClicked, this, ID_MODEL_STORE);
|
||||
//this->Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, &BBLTopbar::OnPublishClicked, this, ID_PUBLISH);
|
||||
this->Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, &BBLTopbar::OnPublishClicked, this, ID_PUBLISH);
|
||||
}
|
||||
|
||||
BBLTopbar::~BBLTopbar()
|
||||
|
@ -374,11 +374,19 @@ void BBLTopbar::OnModelStoreClicked(wxAuiToolBarEvent& event)
|
|||
|
||||
void BBLTopbar::OnPublishClicked(wxAuiToolBarEvent& event)
|
||||
{
|
||||
if (GUI::wxGetApp().plater()->model().objects.empty()) return;
|
||||
if (!wxGetApp().getAgent()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "publish: no agent";
|
||||
return;
|
||||
}
|
||||
|
||||
//no more check
|
||||
//if (GUI::wxGetApp().plater()->model().objects.empty()) return;
|
||||
if (!wxGetApp().is_user_login()) return;
|
||||
|
||||
#ifdef ENABLE_PUBLISHING
|
||||
wxGetApp().plater()->show_publish_dialog();
|
||||
#endif
|
||||
wxGetApp().open_publish_page_dialog();
|
||||
}
|
||||
|
||||
void BBLTopbar::SetFileMenu(wxMenu* file_menu)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue