Skip to content

Commit

Permalink
Update uilayout.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Jan 14, 2024
1 parent 8a53b63 commit f0ba1c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/GUI/uilayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void UILayout::connectDock(UIDock *dock)
} else if (trigger == UIDock::Position::Up && index > 0) {
mLeft->insertWidget(index - 1, dock);
} else if (trigger == UIDock::Position::Right) {
mTop->addWidget(dock);
mTop->insertWidget(0, dock);
} else if (trigger == UIDock::Position::Left) {
mRight->addWidget(dock);
}
Expand All @@ -397,6 +397,8 @@ void UILayout::connectDock(UIDock *dock)
mTop->insertWidget(index - 1, dock);
} else if (trigger == UIDock::Position::Left && index == 0) {
mLeft->insertWidget(index - 1, dock);
} else if (trigger == UIDock::Position::Down && index == 0) {
mBottom->insertWidget(0, dock);
} else if (trigger == UIDock::Position::Down) {
mBottom->addWidget(dock);
}
Expand All @@ -410,6 +412,8 @@ void UILayout::connectDock(UIDock *dock)
mBottom->insertWidget(index - 1, dock);
} else if (trigger == UIDock::Position::Left && index == 0) {
mLeft->insertWidget(index - 1, dock);
} else if (trigger == UIDock::Position::Up && index == 0) {
mTop->insertWidget(0, dock);
} else if (trigger == UIDock::Position::Up) {
mTop->addWidget(dock);
}
Expand All @@ -423,7 +427,7 @@ void UILayout::updateDock(QSplitter *container,
const UIDock::Position &pos)
{
if (!container) { return; }
container->setVisible(container->count() > 0);
//container->setVisible(container->count() > 0);
for (int i = 0; i < container->count(); ++i) {
UIDock *dock = qobject_cast<UIDock*>(container->widget(i));
if (!dock) { continue; }
Expand Down

0 comments on commit f0ba1c1

Please sign in to comment.