fix(color): widgets may not update correctly when flight mode changes (v2) (#6639)
This commit is contained in:
@@ -98,8 +98,9 @@ rect_t Layout::getZone(unsigned int index) const
|
|||||||
void Layout::checkEvents()
|
void Layout::checkEvents()
|
||||||
{
|
{
|
||||||
Window::checkEvents();
|
Window::checkEvents();
|
||||||
if (lastFM != mixerCurrentFlightMode) {
|
rect_t z = getMainZone();
|
||||||
lastFM = mixerCurrentFlightMode;
|
if (z.x != lastMainZone.x || z.y != lastMainZone.y || z.w != lastMainZone.w || z.h != lastMainZone.h) {
|
||||||
|
lastMainZone = z;
|
||||||
updateZones();
|
updateZones();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class Layout: public LayoutBase
|
|||||||
std::unique_ptr<ViewMainDecoration> decoration;
|
std::unique_ptr<ViewMainDecoration> decoration;
|
||||||
uint8_t zoneCount;
|
uint8_t zoneCount;
|
||||||
uint8_t* zoneMap = nullptr;
|
uint8_t* zoneMap = nullptr;
|
||||||
uint8_t lastFM = 0;
|
rect_t lastMainZone = {0,0,0,0};
|
||||||
|
|
||||||
// Last time we refreshed the window
|
// Last time we refreshed the window
|
||||||
uint32_t lastRefresh = 0;
|
uint32_t lastRefresh = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user