Qt: Put p->show() before p->setVisible to allow later to take effect

Closes #18882
This commit is contained in:
Jaap Keuter 2023-03-05 12:20:34 +01:00 committed by John Thacker
parent d574cd2c24
commit cc04dad6d0
1 changed files with 4 additions and 4 deletions

View File

@ -151,6 +151,10 @@ void MainWindow::layoutPanes()
parents[1]->addWidget(getLayoutWidget(prefs.gui_layout_content_2));
parents[2]->addWidget(getLayoutWidget(prefs.gui_layout_content_3));
// Show the packet list here to prevent pending resize events changing columns
// when the packet list is set as current widget for the first time.
packet_list_->show();
const QList<QWidget *> ms_children = master_split_.findChildren<QWidget *>();
extra_split_.setVisible(ms_children.contains(&extra_split_));
@ -159,10 +163,6 @@ void MainWindow::layoutPanes()
byte_view_tab_->setVisible(ms_children.contains(byte_view_tab_) && recent.byte_view_show);
packet_diagram_->setVisible(ms_children.contains(packet_diagram_) && recent.packet_diagram_show);
// Show the packet list here to prevent pending resize events changing columns
// when the packet list is set as current widget for the first time.
packet_list_->show();
packet_list_->thaw(true);
cur_layout_ = new_layout;
}