forked from mirror/openmw-tes3mp
Disable not needed referencable creator widget when in cloning mode.
This commit is contained in:
parent
1b1ecafdd8
commit
dda7ddb6f8
6 changed files with 20 additions and 3 deletions
|
@ -28,6 +28,8 @@ namespace CSVWorld
|
|||
virtual void cloneMode(const std::string& originid, const CSMWorld::UniversalId::Type type, const CSMWorld::UniversalId::ArgumentType argumentType) = 0;
|
||||
|
||||
virtual void setEditLock (bool locked) = 0;
|
||||
|
||||
virtual void toggleWidgets(bool active = true) = 0;
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -157,4 +157,8 @@ void CSVWorld::GenericCreator::cloneMode(const std::string& originid,
|
|||
mClonedId = originid;
|
||||
mClonedType = type;
|
||||
mArgumentType = argumentType;
|
||||
}
|
||||
}
|
||||
|
||||
void CSVWorld::GenericCreator::toggleWidgets(bool active)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace CSVWorld
|
|||
virtual std::string getId() const;
|
||||
|
||||
virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const;
|
||||
|
||||
|
||||
CSMWorld::Data& getData() const;
|
||||
|
||||
const CSMWorld::UniversalId& getCollectionId() const;
|
||||
|
@ -61,6 +61,8 @@ namespace CSVWorld
|
|||
virtual void setEditLock (bool locked);
|
||||
|
||||
virtual void reset();
|
||||
|
||||
virtual void toggleWidgets (bool active = true);
|
||||
|
||||
virtual void cloneMode(const std::string& originid,
|
||||
const CSMWorld::UniversalId::Type type,
|
||||
|
|
|
@ -40,4 +40,10 @@ void CSVWorld::ReferenceableCreator::reset()
|
|||
{
|
||||
mType->setCurrentIndex (0);
|
||||
GenericCreator::reset();
|
||||
}
|
||||
}
|
||||
|
||||
void CSVWorld::ReferenceableCreator::toggleWidgets(bool active)
|
||||
{
|
||||
CSVWorld::GenericCreator::toggleWidgets(active);
|
||||
mType->setEnabled(active);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace CSVWorld
|
|||
const CSMWorld::UniversalId& id);
|
||||
|
||||
virtual void reset();
|
||||
virtual void toggleWidgets(bool active = true);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ void CSVWorld::TableBottomBox::tableSizeChanged (int size, int deleted, int modi
|
|||
void CSVWorld::TableBottomBox::createRequest()
|
||||
{
|
||||
mCreator->reset();
|
||||
mCreator->toggleWidgets(true);
|
||||
mLayout->setCurrentWidget (mCreator);
|
||||
setVisible (true);
|
||||
mCreating = true;
|
||||
|
@ -163,6 +164,7 @@ void CSVWorld::TableBottomBox::cloneRequest(const std::string& id,
|
|||
const CSMWorld::UniversalId::ArgumentType argumnetType)
|
||||
{
|
||||
mCreator->reset();
|
||||
mCreator->toggleWidgets(false);
|
||||
mCreator->cloneMode(id, type, argumnetType);
|
||||
mLayout->setCurrentWidget(mCreator);
|
||||
setVisible (true);
|
||||
|
|
Loading…
Reference in a new issue