diff options
| author | Tannin <devnull@localhost> | 2014-07-14 21:22:44 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-07-14 21:22:44 +0200 |
| commit | 84c66727bff954fd0820fc9f33833848496e9531 (patch) | |
| tree | ca3497150eb9f124d7a124cc48c8d6d1330b7243 /src/modlist.cpp | |
| parent | af8973312188c3d90b8e3f8e2f8036d35e3f21ea (diff) | |
- when highlighting a mod the overwritten and overwriting mods are now highlighted in the list
- when starting an external application MO now wraps the process in a job and waits on that instead. This way MO is not unlocked early when skyrim is started through skse
- mod info dialog no longer offers the esp tab for foreign mods because that caused confusion
- updated translation files
- download directory and mod directory are now created if necessary
- bugfix: staging script created unnecessary copies of translation files
- bugfix: potential invalid array access when trying to determine best mod order
- bugfix: deleter file wasn't removed after esp hiding was disabled
- bugfix: potential access to to un-initialized login reply
- bugfix: changed the initialization order to allow more ui controls to be localized
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 3f46b85f..7e5a5f58 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -23,6 +23,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "messagedialog.h" #include "installationtester.h" #include "qtgroupingproxy.h" +#include "viewmarkingscrollbar.h" #include <gameinfo.h> #include <utility.h> #include <QFileInfo> @@ -291,6 +292,15 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const } } return QVariant(); + } else if ((role == Qt::BackgroundRole) + || (role == ViewMarkingScrollBar::DEFAULT_ROLE)) { + if (m_Overwrite.find(modIndex) != m_Overwrite.end()) { + return QColor(0, 255, 0, 64); + } else if (m_Overwritten.find(modIndex) != m_Overwritten.end()) { + return QColor(255, 0, 0, 64); + } else { + return QVariant(); + } } else if (role == Qt::ToolTipRole) { if (column == COL_FLAGS) { QString result; @@ -576,6 +586,13 @@ void ModList::changeModPriority(int sourceIndex, int newPriority) emit modorder_changed(); } +void ModList::setOverwriteMarkers(const std::set<unsigned int> &overwrite, const std::set<unsigned int> &overwritten) +{ + m_Overwrite = overwrite; + m_Overwritten = overwritten; + notifyChange(0, rowCount()); +} + void ModList::modInfoAboutToChange(ModInfo::Ptr info) { m_ChangeInfo.name = info->name(); @@ -903,9 +920,10 @@ bool ModList::eventFilter(QObject *obj, QEvent *event) } else if ((event->type() == QEvent::KeyPress) && (m_Profile != NULL)) { QAbstractItemView *itemView = qobject_cast<QAbstractItemView*>(obj); QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); - if ((itemView != NULL) && - (keyEvent->modifiers() == Qt::ControlModifier) && - ((keyEvent->key() == Qt::Key_Up) || (keyEvent->key() == Qt::Key_Down))) { + if ((itemView != NULL) + && (keyEvent->modifiers() == Qt::ControlModifier) + && ((keyEvent->key() == Qt::Key_Up) + || (keyEvent->key() == Qt::Key_Down))) { QItemSelectionModel *selectionModel = itemView->selectionModel(); const QAbstractProxyModel *proxyModel = qobject_cast<const QAbstractProxyModel*>(selectionModel->model()); const QSortFilterProxyModel *filterModel = NULL; |
