Central widget update
Updated the setting of central widget with option to set where the possible old central widget will be placed. Fixed option of "unsetting" central widget by setting it to nullptr.
This commit is contained in:
@@ -711,11 +711,14 @@ void DockContainerWidgetPrivate::moveToNewSection(QWidget* Widget, CDockAreaWidg
|
||||
//============================================================================
|
||||
void DockContainerWidgetPrivate::updateSplitterHandles( QSplitter* splitter )
|
||||
{
|
||||
if( splitter )
|
||||
if(DockManager->centralWidget())
|
||||
{
|
||||
for( int index = 0; index < splitter->count(); index++ )
|
||||
if( splitter )
|
||||
{
|
||||
splitter->setStretchFactor(index, widgetResizesWithContainer(splitter->widget(index)) ? 1 : 0);
|
||||
for( int index = 0; index < splitter->count(); index++ )
|
||||
{
|
||||
splitter->setStretchFactor(index, widgetResizesWithContainer(splitter->widget(index)) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1256,7 +1259,6 @@ CDockAreaWidget* DockContainerWidgetPrivate::addDockWidgetToDockArea(DockWidgetA
|
||||
auto TargetAreaSizes = TargetAreaSplitter->sizes();
|
||||
QSplitter* NewSplitter = newSplitter(InsertParam.orientation());
|
||||
NewSplitter->addWidget(TargetDockArea);
|
||||
// updateSplitterHandles(NewSplitter);
|
||||
|
||||
insertWidgetIntoSplitter(NewSplitter, NewDockArea, InsertParam.append());
|
||||
updateSplitterHandles(NewSplitter);
|
||||
|
||||
Reference in New Issue
Block a user