mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Add the proper getErrors() method to CellCreator.
Fix the impossibility of the Exterior Cell creation.
This commit is contained in:
parent
cbb124ab4f
commit
81c7ce5b06
@ -106,3 +106,17 @@ void CSVWorld::CellCreator::cloneMode(const std::string& originId,
|
|||||||
mType->setCurrentIndex(0);
|
mType->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CSVWorld::CellCreator::getErrors() const
|
||||||
|
{
|
||||||
|
std::string errors;
|
||||||
|
if (mType->currentIndex() == 0)
|
||||||
|
{
|
||||||
|
errors = GenericCreator::getErrors();
|
||||||
|
}
|
||||||
|
else if (getData().hasId(getId()))
|
||||||
|
{
|
||||||
|
errors = "The Exterior Cell is already exist";
|
||||||
|
}
|
||||||
|
return errors;
|
||||||
|
}
|
||||||
|
@ -35,6 +35,10 @@ namespace CSVWorld
|
|||||||
virtual void cloneMode(const std::string& originId,
|
virtual void cloneMode(const std::string& originId,
|
||||||
const CSMWorld::UniversalId::Type type);
|
const CSMWorld::UniversalId::Type type);
|
||||||
|
|
||||||
|
virtual std::string getErrors() const;
|
||||||
|
///< Return formatted error descriptions for the current state of the creator. if an empty
|
||||||
|
/// string is returned, there is no error.
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void setType (int index);
|
void setType (int index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user