mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
[PrintingSelector] Sync PrintingSelector availability to OverrideAllCardArtWithPersonalPreference setting. (#6218)
* [PrintingSelector] Clearly warn users about disabling the providerId change, hide and disable the printingSelector, clear the networkCache. Took 56 minutes Took 4 seconds Took 9 minutes * Defer rollback so the rollback isn't swallowed logically. Took 7 minutes * Immediately enable select printing action. Took 7 minutes * Remove restart label. Took 8 seconds * Clear PixmapCache as well as NetworkCache. Took 4 minutes * Lint. Took 3 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
3cff55b0bb
commit
ca1b9bf75f
7 changed files with 94 additions and 21 deletions
|
|
@ -93,6 +93,13 @@ void TabDeckEditor::createMenus()
|
|||
aPrintingSelectorDockFloating->setCheckable(true);
|
||||
connect(aPrintingSelectorDockFloating, &QAction::triggered, this, &TabDeckEditor::dockFloatingTriggered);
|
||||
|
||||
if (SettingsCache::instance().getOverrideAllCardArtWithPersonalPreference()) {
|
||||
printingSelectorDockMenu->setEnabled(false);
|
||||
}
|
||||
|
||||
connect(&SettingsCache::instance(), &SettingsCache::overrideAllCardArtWithPersonalPreferenceChanged, this,
|
||||
[this](bool enabled) { printingSelectorDockMenu->setEnabled(!enabled); });
|
||||
|
||||
viewMenu->addSeparator();
|
||||
|
||||
aResetLayout = viewMenu->addAction(QString());
|
||||
|
|
@ -171,6 +178,13 @@ void TabDeckEditor::loadLayout()
|
|||
restoreGeometry(layouts.getDeckEditorGeometry());
|
||||
}
|
||||
|
||||
if (SettingsCache::instance().getOverrideAllCardArtWithPersonalPreference()) {
|
||||
if (!printingSelectorDockWidget->isHidden()) {
|
||||
printingSelectorDockWidget->setHidden(true);
|
||||
aPrintingSelectorDockVisible->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
aCardInfoDockVisible->setChecked(!cardInfoDockWidget->isHidden());
|
||||
aFilterDockVisible->setChecked(!filterDockWidget->isHidden());
|
||||
aDeckDockVisible->setChecked(!deckDockWidget->isHidden());
|
||||
|
|
@ -203,10 +217,11 @@ void TabDeckEditor::loadLayout()
|
|||
|
||||
void TabDeckEditor::restartLayout()
|
||||
{
|
||||
|
||||
aCardInfoDockVisible->setChecked(true);
|
||||
aDeckDockVisible->setChecked(true);
|
||||
aFilterDockVisible->setChecked(true);
|
||||
aPrintingSelectorDockVisible->setChecked(true);
|
||||
aPrintingSelectorDockVisible->setChecked(!SettingsCache::instance().getOverrideAllCardArtWithPersonalPreference());
|
||||
|
||||
aCardInfoDockFloating->setChecked(false);
|
||||
aDeckDockFloating->setChecked(false);
|
||||
|
|
@ -227,7 +242,7 @@ void TabDeckEditor::restartLayout()
|
|||
deckDockWidget->setVisible(true);
|
||||
cardInfoDockWidget->setVisible(true);
|
||||
filterDockWidget->setVisible(true);
|
||||
printingSelectorDockWidget->setVisible(true);
|
||||
printingSelectorDockWidget->setVisible(!SettingsCache::instance().getOverrideAllCardArtWithPersonalPreference());
|
||||
|
||||
splitDockWidget(cardInfoDockWidget, printingSelectorDockWidget, Qt::Horizontal);
|
||||
splitDockWidget(printingSelectorDockWidget, deckDockWidget, Qt::Horizontal);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue