mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix crash in scale preview reparenting.
This commit is contained in:
@@ -169,12 +169,13 @@ void Preview::watchParent() {
|
||||
}
|
||||
|
||||
void Preview::reparent() {
|
||||
if (_widget.window() == &_widget) {
|
||||
const auto parent = _widget.parentWidget();
|
||||
if (!parent) {
|
||||
// macOS just removes parenting for a _window.
|
||||
_parentWatcher = nullptr;
|
||||
return;
|
||||
}
|
||||
_widget.setParent(_widget.window());
|
||||
_widget.setParent(parent->window(), _widget.windowFlags());
|
||||
if (_shown) {
|
||||
_widget.show();
|
||||
updateGlobalPosition();
|
||||
|
Reference in New Issue
Block a user