mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-21 20:18:17 +08:00
There is a bug related to Ubuntu overlay scrollbars, see https://github.com/prusa3d/Slic3r/issues/898 and https://github.com/prusa3d/Slic3r/issues/952.
The issue apparently manifests when Show()ing a window with overlay scrollbars while the UI is frozen. For this reason, we will Thaw the UI prematurely on Linux. This means destroing the no_updates object prematurely.
This commit is contained in:
parent
dc9a46b269
commit
49cd06407a
@ -2056,7 +2056,15 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
|
|||||||
void Tab::OnTreeSelChange(wxTreeEvent& event)
|
void Tab::OnTreeSelChange(wxTreeEvent& event)
|
||||||
{
|
{
|
||||||
if (m_disable_tree_sel_changed_event) return;
|
if (m_disable_tree_sel_changed_event) return;
|
||||||
|
|
||||||
|
// There is a bug related to Ubuntu overlay scrollbars, see https://github.com/prusa3d/Slic3r/issues/898 and https://github.com/prusa3d/Slic3r/issues/952.
|
||||||
|
// The issue apparently manifests when Show()ing a window with overlay scrollbars while the UI is frozen. For this reason,
|
||||||
|
// we will Thaw the UI prematurely on Linux. This means destroing the no_updates object prematurely.
|
||||||
|
#ifdef __linux__
|
||||||
|
std::unique_ptr<wxWindowUpdateLocker> no_updates(new wxWindowUpdateLocker(this));
|
||||||
|
#else
|
||||||
wxWindowUpdateLocker noUpdates(this);
|
wxWindowUpdateLocker noUpdates(this);
|
||||||
|
#endif
|
||||||
|
|
||||||
Page* page = nullptr;
|
Page* page = nullptr;
|
||||||
auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection());
|
auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection());
|
||||||
@ -2072,6 +2080,11 @@ void Tab::OnTreeSelChange(wxTreeEvent& event)
|
|||||||
|
|
||||||
for (auto& el : m_pages)
|
for (auto& el : m_pages)
|
||||||
el.get()->Hide();
|
el.get()->Hide();
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
no_updates.reset(nullptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
page->Show();
|
page->Show();
|
||||||
m_hsizer->Layout();
|
m_hsizer->Layout();
|
||||||
Refresh();
|
Refresh();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user