Try to minimize problems arising from #418.
This commit is contained in:
parent
bc739ca9fa
commit
0fd3a6c8d3
@ -30,7 +30,7 @@
|
|||||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="3.9.2" date="2021-05-28"/>
|
<release version="3.9.2" date="2021-05-31"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
@ -463,7 +463,15 @@ void FormMain::updateFeedButtonsAvailability() {
|
|||||||
void FormMain::switchVisibility(bool force_hide) {
|
void FormMain::switchVisibility(bool force_hide) {
|
||||||
if (force_hide || isVisible()) {
|
if (force_hide || isVisible()) {
|
||||||
if (SystemTrayIcon::isSystemTrayDesired() && SystemTrayIcon::isSystemTrayAreaAvailable()) {
|
if (SystemTrayIcon::isSystemTrayDesired() && SystemTrayIcon::isSystemTrayAreaAvailable()) {
|
||||||
hide();
|
|
||||||
|
if (QApplication::activeModalWidget() != nullptr) {
|
||||||
|
qApp->showGuiMessage(QSL(APP_LONG_NAME),
|
||||||
|
tr("Close opened modal dialogs first."),
|
||||||
|
QSystemTrayIcon::Warning, qApp->mainFormWidget(), true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Window gets minimized in single-window mode.
|
// Window gets minimized in single-window mode.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
TrayIconMenu::TrayIconMenu(const QString& title, QWidget* parent) : QMenu(title, parent) {}
|
TrayIconMenu::TrayIconMenu(const QString& title, QWidget* parent) : QMenu(title, parent) {}
|
||||||
|
|
||||||
bool TrayIconMenu::event(QEvent* event) {
|
bool TrayIconMenu::event(QEvent* event) {
|
||||||
if (event->type() == QEvent::Show && Application::activeModalWidget() != nullptr) {
|
if (event->type() == QEvent::Type::Show && Application::activeModalWidget() != nullptr) {
|
||||||
QTimer::singleShot(0, this, &TrayIconMenu::hide);
|
QTimer::singleShot(0, this, &TrayIconMenu::hide);
|
||||||
qApp->showGuiMessage(QSL(APP_LONG_NAME),
|
qApp->showGuiMessage(QSL(APP_LONG_NAME),
|
||||||
tr("Close opened modal dialogs first."),
|
tr("Close opened modal dialogs first."),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user