mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Fix crash in saving document from media viewer.
This commit is contained in:
parent
f2286fdffd
commit
4f0f815201
3 changed files with 7 additions and 2 deletions
|
@ -970,9 +970,9 @@ bool Application::minimizeActiveWindow() {
|
||||||
|
|
||||||
QWidget *Application::getFileDialogParent() {
|
QWidget *Application::getFileDialogParent() {
|
||||||
return (_mediaView && !_mediaView->isHidden())
|
return (_mediaView && !_mediaView->isHidden())
|
||||||
? (QWidget*)_mediaView.get()
|
? static_cast<QWidget*>(_mediaView->widget())
|
||||||
: activeWindow()
|
: activeWindow()
|
||||||
? (QWidget*)activeWindow()->widget()
|
? static_cast<QWidget*>(activeWindow()->widget())
|
||||||
: nullptr;
|
: nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2219,6 +2219,10 @@ bool OverlayWidget::isHidden() const {
|
||||||
return _widget->isHidden();
|
return _widget->isHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
not_null<QWidget*> OverlayWidget::widget() const {
|
||||||
|
return _widget;
|
||||||
|
}
|
||||||
|
|
||||||
void OverlayWidget::hide() {
|
void OverlayWidget::hide() {
|
||||||
clearBeforeHide();
|
clearBeforeHide();
|
||||||
applyHideWindowWorkaround();
|
applyHideWindowWorkaround();
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
[[nodiscard]] bool isHidden() const;
|
[[nodiscard]] bool isHidden() const;
|
||||||
|
[[nodiscard]] not_null<QWidget*> widget() const;
|
||||||
void hide();
|
void hide();
|
||||||
void setCursor(style::cursor cursor);
|
void setCursor(style::cursor cursor);
|
||||||
void setFocus();
|
void setFocus();
|
||||||
|
|
Loading…
Add table
Reference in a new issue