From 16ae34d906c3366815022153776ba2b4ef53b7de Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Thu, 26 Oct 2023 15:37:56 +0800 Subject: [PATCH] ENH:add tip for upload_stl and upload_svg Jira: STUDIO-488 Change-Id: I741642c6d0befc0b1d68924b20ace479042cac80 --- src/slic3r/GUI/CreatePresetsDialog.cpp | 10 ++++++++++ src/slic3r/GUI/CreatePresetsDialog.hpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp index 12ac6d4fcc..8f9b384401 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.cpp +++ b/src/slic3r/GUI/CreatePresetsDialog.cpp @@ -1566,6 +1566,9 @@ wxBoxSizer *CreatePrinterPresetDialog::create_hot_bed_stl_item(wxWindow *parent) horizontal_sizer->Add(hot_bed_stl_sizer, 0, wxEXPAND | wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(10)); + m_upload_stl_tip_text = new wxStaticText(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize); + m_upload_stl_tip_text->SetLabelText(_L("Empty")); + horizontal_sizer->Add(m_upload_stl_tip_text, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(10)); return horizontal_sizer; } @@ -1600,6 +1603,9 @@ wxBoxSizer *CreatePrinterPresetDialog::create_hot_bed_svg_item(wxWindow *parent) horizontal_sizer->Add(hot_bed_stl_sizer, 0, wxEXPAND | wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(10)); + m_upload_svg_tip_text = new wxStaticText(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize); + m_upload_svg_tip_text->SetLabelText(_L("Empty")); + horizontal_sizer->Add(m_upload_svg_tip_text, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(10)); return horizontal_sizer; } @@ -1671,6 +1677,7 @@ void CreatePrinterPresetDialog::load_texture() { return; m_custom_texture = ""; + m_upload_svg_tip_text->SetLabelText(_L("Empty")); last_directory = dialog.GetDirectory().ToUTF8().data(); std::string file_name = dialog.GetPath().ToUTF8().data(); if (!boost::algorithm::iends_with(file_name, ".png") && !boost::algorithm::iends_with(file_name, ".svg")) { @@ -1678,6 +1685,7 @@ void CreatePrinterPresetDialog::load_texture() { return; } m_custom_texture = file_name; + m_upload_svg_tip_text->SetLabelText(_L(boost::filesystem::path(file_name).filename().string())); } void CreatePrinterPresetDialog::load_model_stl() @@ -1688,6 +1696,7 @@ void CreatePrinterPresetDialog::load_model_stl() return; m_custom_model = ""; + m_upload_stl_tip_text->SetLabelText(_L("Empty")); last_directory = dialog.GetDirectory().ToUTF8().data(); std::string file_name = dialog.GetPath().ToUTF8().data(); if (!boost::algorithm::iends_with(file_name, ".stl")) { @@ -1695,6 +1704,7 @@ void CreatePrinterPresetDialog::load_model_stl() return; } m_custom_model = file_name; + m_upload_stl_tip_text->SetLabelText(_L(boost::filesystem::path(file_name).filename().string())); } bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(PresetBundle &temp_preset_bundle, bool just_template) diff --git a/src/slic3r/GUI/CreatePresetsDialog.hpp b/src/slic3r/GUI/CreatePresetsDialog.hpp index d83b3ae495..f8fb5a9eac 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.hpp +++ b/src/slic3r/GUI/CreatePresetsDialog.hpp @@ -197,6 +197,8 @@ private: wxBoxSizer * m_page1_sizer = nullptr; wxBoxSizer * m_printer_info_sizer = nullptr; wxBoxSizer * m_page2_sizer = nullptr; + wxStaticText * m_upload_stl_tip_text = nullptr; + wxStaticText * m_upload_svg_tip_text = nullptr; std::string m_custom_texture; std::string m_custom_model; };