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

prevent segfault ;_; repaint only after changing alias

This commit is contained in:
agilob 2015-03-11 11:20:27 +00:00
parent b489e7f712
commit 1abef6c0c6
No known key found for this signature in database
GPG Key ID: 34568050DBCCB997

View File

@ -51,7 +51,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
{
QPoint pos = event->globalPos();
QMenu menu;
QAction* setAlias = menu.addAction(tr("Set title..."));
QAction* setTitle = menu.addAction(tr("Set title..."));
QAction* quitGroup = menu.addAction(tr("Quit group","Menu to quit a groupchat"));
QAction* selectedItem = menu.exec(pos);
@ -59,7 +59,7 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
{
if (selectedItem == quitGroup)
emit removeGroup(groupId);
else if (selectedItem == setAlias)
else if (selectedItem == setTitle)
{
bool ok;
Group* g = GroupList::findGroup(groupId);
@ -69,9 +69,9 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
if (ok && alias != nameLabel->fullText())
emit g->getChatForm()->groupTitleChanged(groupId, alias.left(128));
}
}
this->repaint();
}
}
}
void GroupWidget::onUserListChanged()