mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
Block sync.
Took 16 minutes Took 8 seconds
This commit is contained in:
parent
ab9d5734a0
commit
b646374573
2 changed files with 9 additions and 1 deletions
|
|
@ -76,6 +76,7 @@ VisualDatabaseDisplaySetFilterWidget::VisualDatabaseDisplaySetFilterWidget(QWidg
|
||||||
[this]() { QTimer::singleShot(100, this, &VisualDatabaseDisplaySetFilterWidget::syncWithFilterModel); });
|
[this]() { QTimer::singleShot(100, this, &VisualDatabaseDisplaySetFilterWidget::syncWithFilterModel); });
|
||||||
|
|
||||||
createSetButtons(); // Populate buttons initially
|
createSetButtons(); // Populate buttons initially
|
||||||
|
updateFilterMode();
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +266,14 @@ void VisualDatabaseDisplaySetFilterWidget::syncWithFilterModel()
|
||||||
|
|
||||||
void VisualDatabaseDisplaySetFilterWidget::updateFilterMode()
|
void VisualDatabaseDisplaySetFilterWidget::updateFilterMode()
|
||||||
{
|
{
|
||||||
|
// Disconnect the layoutChanged -> sync lambda temporarily
|
||||||
|
disconnect(filterModel, &FilterTreeModel::layoutChanged, this, nullptr);
|
||||||
|
|
||||||
exactMatchMode = !exactMatchMode;
|
exactMatchMode = !exactMatchMode;
|
||||||
updateSetFilter();
|
updateSetFilter();
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
|
|
||||||
|
// Reconnect the layoutChanged -> sync lambda
|
||||||
|
connect(filterModel, &FilterTreeModel::layoutChanged, this,
|
||||||
|
[this]() { QTimer::singleShot(100, this, &VisualDatabaseDisplaySetFilterWidget::syncWithFilterModel); });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ private:
|
||||||
QMap<QString, QPushButton *> setButtons; // Store set filter buttons
|
QMap<QString, QPushButton *> setButtons; // Store set filter buttons
|
||||||
QMap<QString, bool> activeSets; // Track active set filters
|
QMap<QString, bool> activeSets; // Track active set filters
|
||||||
|
|
||||||
bool exactMatchMode = false; // Toggle between "Exact Match" and "Includes"
|
bool exactMatchMode = true; // Toggle between "Exact Match" and "Includes"
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VISUAL_DATABASE_DISPLAY_SET_FILTER_WIDGET_H
|
#endif // VISUAL_DATABASE_DISPLAY_SET_FILTER_WIDGET_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue