mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:53:51 +00:00
improving the cell cloning.
This commit is contained in:
parent
01be9386d6
commit
032c542396
2 changed files with 7 additions and 3 deletions
|
@ -22,7 +22,7 @@ std::string CSVWorld::CellCreator::getId() const
|
||||||
|
|
||||||
CSVWorld::CellCreator::CellCreator (CSMWorld::Data& data, QUndoStack& undoStack,
|
CSVWorld::CellCreator::CellCreator (CSMWorld::Data& data, QUndoStack& undoStack,
|
||||||
const CSMWorld::UniversalId& id)
|
const CSMWorld::UniversalId& id)
|
||||||
: GenericCreator (data, undoStack, id), mCloningExterior(false)
|
: GenericCreator (data, undoStack, id)
|
||||||
{
|
{
|
||||||
mY = new QSpinBox (this);
|
mY = new QSpinBox (this);
|
||||||
mY->setVisible (false);
|
mY->setVisible (false);
|
||||||
|
@ -61,6 +61,7 @@ void CSVWorld::CellCreator::reset()
|
||||||
mX->setValue (0);
|
mX->setValue (0);
|
||||||
mY->setValue (0);
|
mY->setValue (0);
|
||||||
mType->setCurrentIndex (0);
|
mType->setCurrentIndex (0);
|
||||||
|
setType(0);
|
||||||
GenericCreator::reset();
|
GenericCreator::reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,14 +81,18 @@ void CSVWorld::CellCreator::valueChanged (int index)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::CellCreator::cloneMode(const std::string& originid, const CSMWorld::UniversalId::Type type, const CSMWorld::UniversalId::ArgumentType argumentType)
|
void CSVWorld::CellCreator::cloneMode(const std::string& originid,
|
||||||
|
const CSMWorld::UniversalId::Type type,
|
||||||
|
const CSMWorld::UniversalId::ArgumentType argumentType)
|
||||||
{
|
{
|
||||||
CSVWorld::GenericCreator::cloneMode(originid, type, argumentType);
|
CSVWorld::GenericCreator::cloneMode(originid, type, argumentType);
|
||||||
if (*(originid.begin()) == '#') //if originid points to the exterior cell
|
if (*(originid.begin()) == '#') //if originid points to the exterior cell
|
||||||
{
|
{
|
||||||
setType(1); //enable x and y controls
|
setType(1); //enable x and y controls
|
||||||
|
mType->setCurrentIndex(1);
|
||||||
} else {
|
} else {
|
||||||
setType(0);
|
setType(0);
|
||||||
|
mType->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace CSVWorld
|
||||||
QLabel *mYLabel;
|
QLabel *mYLabel;
|
||||||
QSpinBox *mY;
|
QSpinBox *mY;
|
||||||
|
|
||||||
bool mCloningExterior;
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual std::string getId() const;
|
virtual std::string getId() const;
|
||||||
|
|
Loading…
Reference in a new issue