mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 17:06:40 +00:00
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
|
@ -29,6 +29,8 @@ namespace CSVWorld
|
|||
|
||||
virtual void setEditLock (bool locked) = 0;
|
||||
|
||||
virtual void toggleWidgets(bool active = true) = 0;
|
||||
|
||||
signals:
|
||||
|
||||
void done();
|
||||
|
|
|
@ -158,3 +158,7 @@ void CSVWorld::GenericCreator::cloneMode(const std::string& originid,
|
|||
mClonedType = type;
|
||||
mArgumentType = argumentType;
|
||||
}
|
||||
|
||||
void CSVWorld::GenericCreator::toggleWidgets(bool active)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ namespace CSVWorld
|
|||
|
||||
virtual void reset();
|
||||
|
||||
virtual void toggleWidgets (bool active = true);
|
||||
|
||||
virtual void cloneMode(const std::string& originid,
|
||||
const CSMWorld::UniversalId::Type type,
|
||||
const CSMWorld::UniversalId::ArgumentType argumentType);
|
||||
|
|
|
@ -41,3 +41,9 @@ 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