diff --git a/src/widgets/basewidget.cpp b/src/widgets/basewidget.cpp index 597e0e7b7..76c9121ce 100644 --- a/src/widgets/basewidget.cpp +++ b/src/widgets/basewidget.cpp @@ -51,11 +51,15 @@ float BaseWidget::getDpiMultiplier() void BaseWidget::init() { - this->colorScheme.updated.connect([this]() { + auto connection = this->colorScheme.updated.connect([this]() { this->refreshTheme(); this->update(); }); + + QObject::connect(this, &QObject::destroyed, [connection] { + connection.disconnect(); // + }); } void BaseWidget::initAsWindow() diff --git a/src/widgets/settingsdialog.cpp b/src/widgets/settingsdialog.cpp index efa879324..44d38fd31 100644 --- a/src/widgets/settingsdialog.cpp +++ b/src/widgets/settingsdialog.cpp @@ -290,6 +290,8 @@ QVBoxLayout *SettingsDialog::createAppearanceTab() combo->setCurrentText(currentComboText); QObject::connect(combo, &QComboBox::currentTextChanged, this, [](const QString &value) { + // dirty hack + EmoteManager::getInstance().incGeneration(); pajlada::Settings::Setting::set("/appearance/theme/name", value.toStdString()); });