mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[FancyZones] Align zone numbers between Editor and FancyZonesLib (#7387)
* Align zone numbers between Editor and FancyZonesLib Use zoneId on win+arrow * Update tests * Fix crash * ZoneId starts from 0 * Define ZonesMap type IFACEMETHOD_ macro is having trouble processing std::map template when expanding, so return type needs to be predefined * Address PR comment * Address more PR comments * Handle .at
This commit is contained in:
@@ -404,15 +404,15 @@ namespace FancyZonesEditor
|
||||
_gridModel.ColumnPercents.Add(((_multiplier * (col + 1)) / cols) - ((_multiplier * col) / cols));
|
||||
}
|
||||
|
||||
int index = ZoneCount - 1;
|
||||
for (int col = cols - 1; col >= 0; col--)
|
||||
int index = 0;
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
for (int row = rows - 1; row >= 0; row--)
|
||||
for (int col = 0; col < cols; col++)
|
||||
{
|
||||
_gridModel.CellChildMap[row, col] = index--;
|
||||
if (index < 0)
|
||||
_gridModel.CellChildMap[row, col] = index++;
|
||||
if (index == ZoneCount)
|
||||
{
|
||||
index = 0;
|
||||
index--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user