@@ -235,6 +235,7 @@ class CDockAreaLayout
235
235
236
236
237
237
using DockAreaLayout = CDockAreaLayout;
238
+ static constexpr DockWidgetAreas DefaultAllowedAreas = AllDockAreas;
238
239
239
240
240
241
/* *
@@ -248,7 +249,7 @@ struct DockAreaWidgetPrivate
248
249
CDockAreaTitleBar* TitleBar = nullptr ;
249
250
CDockManager* DockManager = nullptr ;
250
251
bool UpdateTitleBarButtons = false ;
251
- DockWidgetAreas AllowedAreas = AllDockAreas ;
252
+ DockWidgetAreas AllowedAreas = DefaultAllowedAreas ;
252
253
bool HideSingleWidgetTitleBar = false ;
253
254
QSize MinSizeHint;
254
255
@@ -771,6 +772,13 @@ void CDockAreaWidget::saveState(QXmlStreamWriter& s) const
771
772
auto CurrentDockWidget = currentDockWidget ();
772
773
QString Name = CurrentDockWidget ? CurrentDockWidget->objectName () : " " ;
773
774
s.writeAttribute (" Current" , Name);
775
+ auto AllowedAreas = allowedAreas ();
776
+ // To keep the saved XML data small, we only save the allowed areas if
777
+ // the value is different from the default value
778
+ if (AllowedAreas != DefaultAllowedAreas)
779
+ {
780
+ s.writeAttribute (" AllowedAreas" , QString::number (AllowedAreas, 16 ));
781
+ }
774
782
ADS_PRINT (" CDockAreaWidget::saveState TabCount: " << d->ContentsLayout ->count ()
775
783
<< " Current: " << Name);
776
784
for (int i = 0 ; i < d->ContentsLayout ->count (); ++i)
0 commit comments