improved handling of relayouting messages

This commit is contained in:
fourtf
2018-06-04 16:10:54 +02:00
parent bd5f9853f9
commit 7ad4e36dbb
10 changed files with 87 additions and 126 deletions
+17 -1
View File
@@ -58,11 +58,17 @@ WindowManager::WindowManager()
qDebug() << "init WindowManager";
}
void WindowManager::layoutVisibleChatWidgets(Channel *channel)
void WindowManager::layoutChannelViews(Channel *channel)
{
this->layout.invoke(channel);
}
void WindowManager::forceLayoutChannelViews()
{
this->incGeneration();
this->layoutChannelViews(nullptr);
}
void WindowManager::repaintVisibleChatWidgets(Channel *channel)
{
if (this->mainWindow != nullptr) {
@@ -394,5 +400,15 @@ void WindowManager::closeAll()
}
}
int WindowManager::getGeneration() const
{
return this->generation;
}
void WindowManager::incGeneration()
{
this->generation++;
}
} // namespace singletons
} // namespace chatterino