mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
add missing signals when adding new layout
This commit is contained in:
parent
50c419d4e4
commit
ba178e534d
@ -301,7 +301,6 @@ void Manager::importPresets(bool includeDefault)
|
||||
if (!includeDefault) {
|
||||
start = 2;
|
||||
}
|
||||
|
||||
for (int i = start; i <= 4; ++i) {
|
||||
importPreset(i, false);
|
||||
}
|
||||
|
@ -68,10 +68,6 @@ Synchronizer::Synchronizer(QObject *parent)
|
||||
syncMultipleLayoutsToActivities();
|
||||
}
|
||||
});
|
||||
|
||||
//! Templates tracking
|
||||
|
||||
connect(m_manager->corona()->templatesManager(), &Templates::Manager::newLayoutAdded, this, &Synchronizer::onLayoutAdded);
|
||||
}
|
||||
|
||||
Synchronizer::~Synchronizer()
|
||||
@ -582,6 +578,11 @@ void Synchronizer::loadLayouts()
|
||||
|
||||
emit layoutsChanged();
|
||||
emit menuLayoutsChanged();
|
||||
|
||||
if (!m_isLoaded) {
|
||||
m_isLoaded = true;
|
||||
connect(m_manager->corona()->templatesManager(), &Latte::Templates::Manager::newLayoutAdded, this, &Synchronizer::onLayoutAdded);
|
||||
}
|
||||
}
|
||||
|
||||
void Synchronizer::onLayoutAdded(const QString &layout)
|
||||
@ -606,6 +607,11 @@ void Synchronizer::onLayoutAdded(const QString &layout)
|
||||
if (!sharedName.isEmpty() && !m_sharedLayoutIds.contains(sharedName)) {
|
||||
m_sharedLayoutIds << sharedName;
|
||||
}
|
||||
|
||||
if (m_isLoaded) {
|
||||
emit layoutsChanged();
|
||||
emit menuLayoutsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void Synchronizer::unloadLayouts()
|
||||
|
@ -149,6 +149,7 @@ private:
|
||||
|
||||
private:
|
||||
bool m_multipleModeInitialized{false};
|
||||
bool m_isLoaded{false};
|
||||
|
||||
QString m_currentLayoutNameInMultiEnvironment;
|
||||
QString m_shouldSwitchToLayout;
|
||||
|
Loading…
Reference in New Issue
Block a user