mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-05 23:01:17 +00:00
Open the Design tab quickly on Windows the first time
A page built on first click is now built before it is shown, as the idle prebuild already does, so its controls are not created inside a visible window. This takes the Design tab's first open on Windows from ~9 s to ~1 s.
This commit is contained in:
@@ -57,6 +57,11 @@ public:
|
||||
// virtual from the book's ShowWithEffect() only for wxSHOW_EFFECT_NONE, the default.
|
||||
bool Show(bool show = true) override
|
||||
{
|
||||
// Built before this page is shown, as an idle prebuild builds it. On MSW every control
|
||||
// created or moved inside a shown window re-clips and repaints its shown siblings, so
|
||||
// building a large panel into a shown page took seconds.
|
||||
if (show && wxGetTopLevelParent(this)->IsShown())
|
||||
this->ensure();
|
||||
const bool changed = wxPanel::Show(show);
|
||||
if (show) {
|
||||
// The book shows its first page as it is inserted, before startup has chosen the
|
||||
|
||||
Reference in New Issue
Block a user