mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-19 17:18:09 +08:00
Temporary workaround for the correct behavior of the Scrolled sidebar panel
This commit is contained in:
parent
ede21eec7a
commit
410568c9d9
@ -115,6 +115,16 @@ bool GUI_App::OnInit()
|
|||||||
update_mode();
|
update_mode();
|
||||||
SetTopWindow(mainframe);
|
SetTopWindow(mainframe);
|
||||||
|
|
||||||
|
CallAfter([this]() {
|
||||||
|
// temporary workaround for the correct behavior of the Scrolled sidebar panel
|
||||||
|
auto& panel = sidebar();
|
||||||
|
if (panel.obj_list()->GetMinHeight() > 200) {
|
||||||
|
wxWindowUpdateLocker noUpdates_sidebar(&panel);
|
||||||
|
panel.obj_list()->SetMinSize(wxSize(-1, 200));
|
||||||
|
panel.Layout();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// This makes CallAfter() work
|
// This makes CallAfter() work
|
||||||
Bind(wxEVT_IDLE, [this](wxIdleEvent& event)
|
Bind(wxEVT_IDLE, [this](wxIdleEvent& event)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,10 @@ ObjectList::~ObjectList()
|
|||||||
|
|
||||||
void ObjectList::create_objects_ctrl()
|
void ObjectList::create_objects_ctrl()
|
||||||
{
|
{
|
||||||
SetMinSize(wxSize(-1, 150)); // TODO - Set correct height according to the opened/closed objects
|
// temporary workaround for the correct behavior of the Scrolled sidebar panel:
|
||||||
|
// 1. set a height of the list to some big value
|
||||||
|
// 2. change it to the normal min value (200) after first whole App updating/layouting
|
||||||
|
SetMinSize(wxSize(-1, 1500)); // #ys_FIXME
|
||||||
|
|
||||||
m_sizer = new wxBoxSizer(wxVERTICAL);
|
m_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
m_sizer->Add(this, 1, wxGROW | wxLEFT, 20);
|
m_sizer->Add(this, 1, wxGROW | wxLEFT, 20);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user