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()
|
||||
{
|
||||
Window::checkEvents();
|
||||
if (lastFM != mixerCurrentFlightMode) {
|
||||
lastFM = mixerCurrentFlightMode;
|
||||
rect_t z = getMainZone();
|
||||
if (z.x != lastMainZone.x || z.y != lastMainZone.y || z.w != lastMainZone.w || z.h != lastMainZone.h) {
|
||||
lastMainZone = z;
|
||||
updateZones();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class Layout: public LayoutBase
|
||||
std::unique_ptr<ViewMainDecoration> decoration;
|
||||
uint8_t zoneCount;
|
||||
uint8_t* zoneMap = nullptr;
|
||||
uint8_t lastFM = 0;
|
||||
rect_t lastMainZone = {0,0,0,0};
|
||||
|
||||
// Last time we refreshed the window
|
||||
uint32_t lastRefresh = 0;
|
||||
|
||||
Reference in New Issue
Block a user