NOISSUE do not lose selection on mod enable/disable toggle
This commit is contained in:
parent
dfb30d9139
commit
c291946d2a
7 changed files with 99 additions and 60 deletions
|
@ -48,6 +48,11 @@ public:
|
|||
DateColumn,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
enum ModStatusAction {
|
||||
Disable,
|
||||
Enable,
|
||||
Toggle
|
||||
};
|
||||
ModFolderModel(const QString &dir);
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
@ -93,8 +98,7 @@ public:
|
|||
bool deleteMods(const QModelIndexList &indexes);
|
||||
|
||||
/// Enable or disable listed mods
|
||||
bool enableMods(const QModelIndexList &indexes, bool enable = true);
|
||||
void toggleEnabled(const QModelIndex &index);
|
||||
bool setModStatus(const QModelIndexList &indexes, ModStatusAction action);
|
||||
|
||||
void startWatching();
|
||||
void stopWatching();
|
||||
|
@ -125,6 +129,7 @@ signals:
|
|||
|
||||
private:
|
||||
void resolveMod(Mod& m);
|
||||
bool setModStatus(int index, ModStatusAction action);
|
||||
|
||||
protected:
|
||||
QFileSystemWatcher *m_watcher;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue