fix: explicitly queue forced layouts (#6278)
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@
|
|||||||
- Dev: Removed authenticated PubSub implementation. (#6158)
|
- Dev: Removed authenticated PubSub implementation. (#6158)
|
||||||
- Dev: Save settings in `aboutToQuit`. (#6159)
|
- Dev: Save settings in `aboutToQuit`. (#6159)
|
||||||
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
|
- Dev: Bumped deprecation cutoff to Qt 6.4.3. (#6169)
|
||||||
- Dev: Use `QMetaObject::invokeMethod` to run code on a specific thread. (#6203)
|
- Dev: Use `QMetaObject::invokeMethod` to run code on a specific thread. (#6203, #6278)
|
||||||
- Dev: Added a `run-and-kill.sh` script to help debug crash-on-exit bugs. (#6188)
|
- Dev: Added a `run-and-kill.sh` script to help debug crash-on-exit bugs. (#6188)
|
||||||
- Dev: Refactored the `TimeoutStackStyle` enum into its own file. (#6216)
|
- Dev: Refactored the `TimeoutStackStyle` enum into its own file. (#6216)
|
||||||
- Dev: Refactored `Notebook`-related enums into their own file. (#6220)
|
- Dev: Refactored `Notebook`-related enums into their own file. (#6220)
|
||||||
|
|||||||
+13
-8
@@ -250,14 +250,19 @@ void assignFrames(std::weak_ptr<Image> weak, QList<Frame> parsed)
|
|||||||
if (!isPushQueued)
|
if (!isPushQueued)
|
||||||
{
|
{
|
||||||
isPushQueued = true;
|
isPushQueued = true;
|
||||||
postToThread([] {
|
// We don't use postToThread here, because that would run immediately.
|
||||||
isPushQueued = false;
|
// We explicitly want to queue a callback after the current ones.
|
||||||
auto *app = tryGetApp();
|
QMetaObject::invokeMethod(
|
||||||
if (app != nullptr)
|
qApp,
|
||||||
{
|
[] {
|
||||||
app->getWindows()->forceLayoutChannelViews();
|
isPushQueued = false;
|
||||||
}
|
auto *app = tryGetApp();
|
||||||
});
|
if (app != nullptr)
|
||||||
|
{
|
||||||
|
app->getWindows()->forceLayoutChannelViews();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user