diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 16:00:19 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 16:00:19 +0200 |
| commit | f6ecb93d460b16c10933b35605f7ac1d60eac705 (patch) | |
| tree | e8af7ad19d7f5650885d0b57cf4364db9090e7f5 /src/modlist.cpp | |
| parent | 4f14598cfc2ea2cf13cbf35fdd9d61338eb1f409 (diff) | |
Set delete Key to recursively clear overwrite with confirmation message.
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index aaa4ba79..87cbbfb2 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -999,6 +999,15 @@ bool ModList::removeRows(int row, int count, const QModelIndex &parent) bool success = false;
+ if (count == 1) {
+ ModInfo::Ptr modInfo = ModInfo::getByIndex(row);
+ std::vector<ModInfo::EFlag> flags = modInfo->getFlags();
+ if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end()) {
+ emit clearOverwrite();
+ success = true;
+ }
+ }
+
for (int i = 0; i < count; ++i) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(row + i);
if (!modInfo->isRegular()) {
|
