mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 01:15:53 +08:00
Suppress to use info line "Post processing scripts shall..." on Linux.
Otherwise click on this line causes a strange frizz of the settings page. And line hovering by the mouse has no visual effect on Linux. (Neither wxEVT_ENTER_WINDOW nor wxEVT_LEAVE_WINDOW isn't catch by wxStaticText for some reason) + Call of the SetToolTip() moved from constructor to wxEVT_ENTER_WINDOW. In this case Tooltip text will always respect to the "suppress_hyperlinks" value.
This commit is contained in:
parent
3622f06bed
commit
fdc4ee7542
@ -1032,9 +1032,6 @@ void ogStaticText::SetText(const wxString& value, bool wrap/* = true*/)
|
|||||||
|
|
||||||
void ogStaticText::SetPathEnd(const std::string& link)
|
void ogStaticText::SetPathEnd(const std::string& link)
|
||||||
{
|
{
|
||||||
if (get_app_config()->get("suppress_hyperlinks") != "1")
|
|
||||||
SetToolTip(OptionsGroup::get_url(link));
|
|
||||||
|
|
||||||
Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& event) {
|
Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& event) {
|
||||||
if (HasCapture())
|
if (HasCapture())
|
||||||
return;
|
return;
|
||||||
@ -1048,7 +1045,11 @@ void ogStaticText::SetPathEnd(const std::string& link)
|
|||||||
OptionsGroup::launch_browser(link);
|
OptionsGroup::launch_browser(link);
|
||||||
event.Skip();
|
event.Skip();
|
||||||
} );
|
} );
|
||||||
Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent& event) { FocusText(true) ; event.Skip(); });
|
Bind(wxEVT_ENTER_WINDOW, [this, link](wxMouseEvent& event) {
|
||||||
|
SetToolTip(OptionsGroup::get_url(get_app_config()->get("suppress_hyperlinks") != "1" ? link : std::string()));
|
||||||
|
FocusText(true);
|
||||||
|
event.Skip();
|
||||||
|
});
|
||||||
Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& event) { FocusText(false); event.Skip(); });
|
Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& event) { FocusText(false); event.Skip(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1731,7 +1731,9 @@ void TabPrint::update_description_lines()
|
|||||||
if (m_active_page && m_active_page->title() == "Output options" && m_post_process_explanation) {
|
if (m_active_page && m_active_page->title() == "Output options" && m_post_process_explanation) {
|
||||||
m_post_process_explanation->SetText(
|
m_post_process_explanation->SetText(
|
||||||
_u8L("Post processing scripts shall modify G-code file in place."));
|
_u8L("Post processing scripts shall modify G-code file in place."));
|
||||||
|
#ifndef __linux__
|
||||||
m_post_process_explanation->SetPathEnd("post-processing-scripts_283913");
|
m_post_process_explanation->SetPathEnd("post-processing-scripts_283913");
|
||||||
|
#endif // __linux__
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user