mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[FancyZones] Clone parent data only for new VD (#7116)
* [FancyZones] Clone parent data only for new VD
This commit is contained in:
@@ -443,9 +443,9 @@ ZoneWindow::ClearSelectedZones() noexcept
|
||||
|
||||
void ZoneWindow::InitializeZoneSets(const std::wstring& parentUniqueId) noexcept
|
||||
{
|
||||
// If there is not defined zone layout for this work area, created default entry.
|
||||
FancyZonesDataInstance().AddDevice(m_uniqueId);
|
||||
if (!parentUniqueId.empty())
|
||||
bool deviceAdded = FancyZonesDataInstance().AddDevice(m_uniqueId);
|
||||
// If the device has been added, check if it should inherit the parent's layout
|
||||
if (deviceAdded && !parentUniqueId.empty())
|
||||
{
|
||||
FancyZonesDataInstance().CloneDeviceInfo(parentUniqueId, m_uniqueId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user