mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
rename method and make it public
This commit is contained in:
parent
9646d3f82d
commit
426f64da95
2 changed files with 7 additions and 5 deletions
|
|
@ -97,7 +97,7 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
|
|||
refreshShortcuts();
|
||||
|
||||
connect(&SettingsCache::instance(), &SettingsCache::visualDeckStorageInGameChanged, this,
|
||||
&DeckViewContainer::updateShowVisualDeckStorage);
|
||||
&DeckViewContainer::setVisualDeckStorageExists);
|
||||
|
||||
switchToDeckSelectView();
|
||||
}
|
||||
|
|
@ -207,11 +207,13 @@ void DeckViewContainer::refreshShortcuts()
|
|||
}
|
||||
|
||||
/**
|
||||
* Update VDS existence when settings change
|
||||
* Updates the existence of the embedded Visual Deck Storage, destroying or creating it if needed.
|
||||
* Note that this change is temporary; the VDS may get recreated when the view transitions to the deck select state,
|
||||
* depending on current settings.
|
||||
*/
|
||||
void DeckViewContainer::updateShowVisualDeckStorage(bool enabled)
|
||||
void DeckViewContainer::setVisualDeckStorageExists(bool exists)
|
||||
{
|
||||
if (enabled) {
|
||||
if (exists) {
|
||||
// view mode state isn't stored in a field, so we determine state by checking the button
|
||||
if (loadLocalButton->isEnabled()) {
|
||||
// We only need to handle the setting changing while in deck select state; tryCreate already gets called
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ private slots:
|
|||
void sideboardLockButtonClicked();
|
||||
void updateSideboardLockButtonText();
|
||||
void refreshShortcuts();
|
||||
void updateShowVisualDeckStorage(bool enabled);
|
||||
signals:
|
||||
void newCardAdded(AbstractCardItem *card);
|
||||
void notIdle();
|
||||
|
|
@ -78,6 +77,7 @@ public:
|
|||
void readyAndUpdate();
|
||||
void setSideboardLocked(bool locked);
|
||||
void setDeck(const DeckLoader &deck);
|
||||
void setVisualDeckStorageExists(bool exists);
|
||||
|
||||
public slots:
|
||||
void loadDeckFromFile(const QString &filePath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue