1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Make tool buttons inactive when showing profile

This commit is contained in:
tux3 2015-05-07 19:47:18 +02:00
parent 8d91997ae5
commit 4e1dd74269
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -547,6 +547,7 @@ void Widget::showProfile() // onAvatarClicked, onUsernameClicked
void Widget::hideMainForms() void Widget::hideMainForms()
{ {
setActiveToolMenuButton(Widget::None);
QLayoutItem* item; QLayoutItem* item;
while ((item = ui->mainHead->layout()->takeAt(0)) != 0) while ((item = ui->mainHead->layout()->takeAt(0)) != 0)
item->widget()->hide(); item->widget()->hide();
@ -736,7 +737,6 @@ void Widget::onFriendUsernameChanged(int friendId, const QString& username)
void Widget::onChatroomWidgetClicked(GenericChatroomWidget *widget) void Widget::onChatroomWidgetClicked(GenericChatroomWidget *widget)
{ {
hideMainForms(); hideMainForms();
setActiveToolMenuButton(Widget::None);
widget->setChatForm(*ui); widget->setChatForm(*ui);
if (activeChatroomWidget != nullptr) if (activeChatroomWidget != nullptr)
activeChatroomWidget->setAsInactiveChatroom(); activeChatroomWidget->setAsInactiveChatroom();