From b3fb437f8eea77b1b6210d22aa247138eb14dac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 9 Feb 2018 00:54:17 +0100 Subject: [PATCH] NOISSUE When changing version of or installing a package, remove customized version --- api/logic/minecraft/ComponentList.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/logic/minecraft/ComponentList.cpp b/api/logic/minecraft/ComponentList.cpp index dc7f3614..43ab3de8 100644 --- a/api/logic/minecraft/ComponentList.cpp +++ b/api/logic/minecraft/ComponentList.cpp @@ -1172,10 +1172,15 @@ bool ComponentList::setComponentVersion(const QString& uid, const QString& versi auto iter = d->componentIndex.find(uid); if(iter != d->componentIndex.end()) { + ComponentPtr component = *iter; // set existing - (*iter)->setVersion(version); - (*iter)->setImportant(important); - return true; + if(component->revert()) + { + component->setVersion(version); + component->setImportant(important); + return true; + } + return false; } else {