Skip to content

Commit 81980e9

Browse files
committed
Insert ChatTextList/ChatTextEdit at correct index
Fixes issue where edit field is above the history.
1 parent 1ef145d commit 81980e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Client/qtTeamTalk/mainwindow.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -2769,28 +2769,28 @@ void MainWindow::setupChatHistory()
27692769
if (listview)
27702770
{
27712771
auto chat = new ChatTextList(ui.chatTab);
2772-
auto layout = ui.chatTab->layout();
2772+
auto layout = ui.verticalLayout_3;
27732773
auto index = layout->indexOf(ui.chatEdit);
27742774
layout->removeWidget(ui.chatEdit);
2775-
layout->addWidget(chat);
2775+
layout->insertWidget(index, chat);
27762776
m_chathistory[TAB_CHAT] = chat;
27772777
delete ui.chatEdit;
27782778
ui.chatEdit = nullptr;
27792779

27802780
auto video = new ChatTextList(ui.videoTab);
2781-
layout = ui.videoTab->layout();
2781+
layout = ui.verticalLayout_9;
27822782
index = layout->indexOf(ui.videochatEdit);
27832783
layout->removeWidget(ui.videochatEdit);
2784-
layout->addWidget(video);
2784+
layout->insertWidget(index, video);
27852785
m_chathistory[TAB_VIDEO] = video;
27862786
delete ui.videochatEdit;
27872787
ui.videochatEdit = nullptr;
27882788

27892789
auto desktop = new ChatTextList(ui.desktopTab);
2790-
layout = ui.desktopTab->layout();
2790+
layout = ui.verticalLayout_8;
27912791
index = layout->indexOf(ui.desktopchatEdit);
27922792
layout->removeWidget(ui.desktopchatEdit);
2793-
layout->addWidget(desktop);
2793+
layout->insertWidget(index, desktop);
27942794
m_chathistory[TAB_DESKTOP] = desktop;
27952795
delete ui.desktopchatEdit;
27962796
ui.desktopchatEdit = nullptr;

0 commit comments

Comments
 (0)