From 3cd2c3b1e5630bc5471ee00a448574f64c742140 Mon Sep 17 00:00:00 2001 From: Alessandro Mattiazzi Date: Tue, 8 Oct 2024 15:06:48 +0200 Subject: [PATCH] Added check_condition Checking if self.notebooks is populated, if not call the function responsible for it --- wx/lib/agw/aui/framemanager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wx/lib/agw/aui/framemanager.py b/wx/lib/agw/aui/framemanager.py index 8788f8d8b..6d2e17c92 100644 --- a/wx/lib/agw/aui/framemanager.py +++ b/wx/lib/agw/aui/framemanager.py @@ -5244,6 +5244,10 @@ def LoadPerspective(self, layout, update=True, restorecaption=False, saveCapt = {} # see restorecaption param saveIcon = {} # icons are not preserved by perspectives, so preserve them saveMinimize = {} # see restoreminimize param + + if not self._notebooks: + self.DoUpdate() + for pane in self._panes: # dock the notebook pages