mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Multiwindow: Fix segfault on quiting groups, remove dead code
This commit is contained in:
parent
1109e0347e
commit
aa9a10fa8b
|
@ -346,23 +346,14 @@ void ContentDialog::cycleContacts(bool forward, bool loop)
|
|||
}
|
||||
else if (index >= currentLayout->count())
|
||||
{
|
||||
/*if (!loop && currentLayout == friendLayout->getLayoutOffline())
|
||||
{
|
||||
forward = !forward; // Go backward.
|
||||
index += forward ? 2 : -2; // Go back to where started and then one.
|
||||
continue; // Recheck bounds.
|
||||
}
|
||||
else*/
|
||||
{
|
||||
currentLayout = nextLayout(currentLayout, forward);
|
||||
index = 0;
|
||||
}
|
||||
currentLayout = nextLayout(currentLayout, forward);
|
||||
index = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
GenericChatroomWidget* chatWidget = dynamic_cast<GenericChatroomWidget*>(currentLayout->itemAt(index)->widget());
|
||||
|
||||
if (chatWidget != nullptr)
|
||||
if (chatWidget != nullptr && chatWidget != activeChatroomWidget)
|
||||
onChatroomWidgetClicked(chatWidget, false);
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user