mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
Additional Model metadata - Description (#9398)
* starting to add description field to GUI
* additional work to add GUI
* make a multi-line entry
* Remove building of non-mac
* fix tag collision
* debugging suggestions from CoPilot
* yet another debug suggestion
* Fix build with Xcode 16.3
* Simplify OpenVDB patch, from 930c3acb8e (diff-bc3061cc2fe6c64a3d67c8350330bb3a530d01037faace6da27ad9a12aa03e29)
* Fix CGAL header under clang 19
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281880
* Fix compile error due to removal of base template for `std::char_traits` in clang 19
https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html#deprecations-and-removals
* Update Auxiliary.cpp trying to prevent crash
* Add files via upload
* from other branch
* rolling back changes
---------
Co-authored-by: Kaleb Best <kalebbest@MacBook-Air.local>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
@@ -76,6 +76,16 @@ ProjectPanel::ProjectPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
|
||||
ProjectPanel::~ProjectPanel() {}
|
||||
|
||||
// Helper to convert newlines to <br>
|
||||
static std::string convert_newlines_to_br(const std::string& text) {
|
||||
std::string result = text;
|
||||
size_t pos = 0;
|
||||
while ((pos = result.find('\n', pos)) != std::string::npos) {
|
||||
result.replace(pos, 1, "<br>");
|
||||
pos += 4;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void ProjectPanel::onWebNavigating(wxWebViewEvent& evt)
|
||||
{
|
||||
@@ -189,7 +199,7 @@ void ProjectPanel::on_reload(wxCommandEvent& evt)
|
||||
j["model"]["name"] = wxGetApp().url_encode(model_name);
|
||||
j["model"]["author"] = wxGetApp().url_encode(model_author);;
|
||||
j["model"]["cover_img"] = wxGetApp().url_encode(cover_file);
|
||||
j["model"]["description"] = wxGetApp().url_encode(description);
|
||||
j["model"]["description"] = wxGetApp().url_encode(convert_newlines_to_br(description));
|
||||
j["model"]["preview_img"] = files["Model Pictures"];
|
||||
j["model"]["upload_type"] = update_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user