Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-07-25 14:10:57 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-07-25 14:10:57 +0300
commitd27d3257f7be16ad16eec8f62bfd4cdec4b82e2e (patch)
tree6b8f32ce6a5c7e1773bc737a93125c9c83b3763e /src/slic3r/GUI/BedShapeDialog.cpp
parente86d40fe9854ca484a15c84c20a9b88f49bc6566 (diff)
Added tooltip to filename fields for custom texture and model into bed shape dialog to show the full path of the file
Diffstat (limited to 'src/slic3r/GUI/BedShapeDialog.cpp')
-rw-r--r--src/slic3r/GUI/BedShapeDialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp
index 60b4f37f1..5446550a7 100644
--- a/src/slic3r/GUI/BedShapeDialog.cpp
+++ b/src/slic3r/GUI/BedShapeDialog.cpp
@@ -208,6 +208,14 @@ wxPanel* BedShapePanel::init_texture_panel()
filename_lbl->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e)
{
e.SetText(_(boost::filesystem::path(m_custom_texture).filename().string()));
+ wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
+ if (lbl != nullptr)
+ {
+ wxString tooltip_text = (m_custom_texture == NONE) ? _(L("")) : _(m_custom_texture);
+ wxToolTip* tooltip = lbl->GetToolTip();
+ if ((tooltip == nullptr) || (tooltip->GetTip() != tooltip_text))
+ lbl->SetToolTip(tooltip_text);
+ }
}));
remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e)
@@ -268,6 +276,14 @@ wxPanel* BedShapePanel::init_model_panel()
filename_lbl->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e)
{
e.SetText(_(boost::filesystem::path(m_custom_model).filename().string()));
+ wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
+ if (lbl != nullptr)
+ {
+ wxString tooltip_text = (m_custom_model == NONE) ? _(L("")) : _(m_custom_model);
+ wxToolTip* tooltip = lbl->GetToolTip();
+ if ((tooltip == nullptr) || (tooltip->GetTip() != tooltip_text))
+ lbl->SetToolTip(tooltip_text);
+ }
}));
remove_btn->Bind(wxEVT_UPDATE_UI, ([this](wxUpdateUIEvent& e)