diff options
| author | Tannin <devnull@localhost> | 2014-07-27 18:34:32 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-07-27 18:34:32 +0200 |
| commit | 715623e7905e5f64f5b331f4523642aab1aedd34 (patch) | |
| tree | 38822f96aee0b584e13d19af9c5875a2950f3e55 /src/modlistsortproxy.cpp | |
| parent | 9879aae5757e0c2ca930b38c6b7a4aeb4715d2d9 (diff) | |
- browser dialog now has a hidden url-field (for testing only)
- loot_cli is no longer part of this project. I will probably create a fork of loot that allows command-line usage instead
- loot integration now works with such a modified loot version
- integrated loot will now also integrate incompatibility messages in the MO UI
- overwrite-markers are now updated as the list order is changed
- fnis checker will now always allow the user to ignore fnis errors
- plugin interface now has a function to wait for handles returned from startApplication (which can be job or process handles)
- bugfix: non-mo mods sharing the name with regular mods now have a different internal name
- bugfix: using hotkeys the vanilla game-plugins could be moved
Diffstat (limited to 'src/modlistsortproxy.cpp')
| -rw-r--r-- | src/modlistsortproxy.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index d790e277..ecd1755d 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -34,6 +34,7 @@ ModListSortProxy::ModListSortProxy(Profile* profile, QObject *parent) , m_CurrentFilter()
, m_FilterActive(false)
, m_FilterMode(FILTER_AND)
+ , m_BeingInvalidated(false)
{
m_EnabledColumns.set(ModList::COL_FLAGS);
m_EnabledColumns.set(ModList::COL_NAME);
@@ -43,7 +44,6 @@ ModListSortProxy::ModListSortProxy(Profile* profile, QObject *parent) // but I don't know why. This should be necessary
}
-
void ModListSortProxy::setProfile(Profile *profile)
{
m_Profile = profile;
@@ -72,7 +72,6 @@ Qt::ItemFlags ModListSortProxy::flags(const QModelIndex &modelIndex) const return flags;
}
-
void ModListSortProxy::displayColumnSelection(const QPoint &pos)
{
QMenu menu;
@@ -103,7 +102,6 @@ void ModListSortProxy::displayColumnSelection(const QPoint &pos) emit layoutChanged();
}
-
void ModListSortProxy::enableAllVisible()
{
if (m_Profile == NULL) return;
@@ -115,7 +113,6 @@ void ModListSortProxy::enableAllVisible() invalidate();
}
-
void ModListSortProxy::disableAllVisible()
{
if (m_Profile == NULL) return;
@@ -127,7 +124,6 @@ void ModListSortProxy::disableAllVisible() invalidate();
}
-
bool ModListSortProxy::lessThan(const QModelIndex &left,
const QModelIndex &right) const
{
@@ -208,15 +204,16 @@ bool ModListSortProxy::lessThan(const QModelIndex &left, return lt;
}
-
void ModListSortProxy::updateFilter(const QString &filter)
{
m_CurrentFilter = filter;
updateFilterActive();
+ // workaround because qt throws a fit if, as a result of this invalidation, another invalidate is called
+ m_BeingInvalidated = true;
invalidateFilter();
+ m_BeingInvalidated = false;
}
-
bool ModListSortProxy::hasConflictFlag(const std::vector<ModInfo::EFlag> &flags) const
{
foreach (ModInfo::EFlag flag, flags) {
@@ -231,7 +228,6 @@ bool ModListSortProxy::hasConflictFlag(const std::vector<ModInfo::EFlag> &flags) return false;
}
-
bool ModListSortProxy::filterMatchesModAnd(ModInfo::Ptr info, bool enabled) const
{
for (auto iter = m_CategoryFilter.begin(); iter != m_CategoryFilter.end(); ++iter) {
@@ -306,8 +302,6 @@ bool ModListSortProxy::filterMatchesModOr(ModInfo::Ptr info, bool enabled) const return false;
}
-
-
bool ModListSortProxy::filterMatchesMod(ModInfo::Ptr info, bool enabled) const
{
if (!m_CurrentFilter.isEmpty() &&
@@ -330,7 +324,6 @@ void ModListSortProxy::setFilterMode(ModListSortProxy::FilterMode mode) }
}
-
bool ModListSortProxy::filterAcceptsRow(int row, const QModelIndex &parent) const
{
if (m_Profile == NULL) {
@@ -362,7 +355,6 @@ bool ModListSortProxy::filterAcceptsRow(int row, const QModelIndex &parent) cons }
}
-
bool ModListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
{
|
