mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 07:15:32 +00:00
make compilation delay configurable via a user setting
This commit is contained in:
parent
7f89d3688f
commit
25bb2983e2
2 changed files with 12 additions and 1 deletions
|
@ -346,6 +346,12 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||
Setting *toolbar = createSetting (Type_CheckBox, "toolbar", "Show toolbar");
|
||||
toolbar->setDefaultValue ("true");
|
||||
|
||||
Setting *delay = createSetting (Type_SpinBox, "compile-delay",
|
||||
"Delay between updating of source errors");
|
||||
delay->setDefaultValue (100);
|
||||
delay->setRange (0, 10000);
|
||||
delay->setToolTip ("Delay in milliseconds");
|
||||
|
||||
Setting *formatInt = createSetting (Type_LineEdit, "colour-int", "Highlight Colour: Int");
|
||||
formatInt->setDefaultValues (QStringList() << "Dark magenta");
|
||||
formatInt->setToolTip ("(Default: Green) Use one of the following formats:" + tooltip);
|
||||
|
|
|
@ -39,7 +39,8 @@ void CSVWorld::ScriptSubView::addButtonBar()
|
|||
void CSVWorld::ScriptSubView::recompile()
|
||||
{
|
||||
if (!mCompileDelay->isActive())
|
||||
mCompileDelay->start (5000);
|
||||
mCompileDelay->start (
|
||||
CSMSettings::UserSettings::instance().setting ("script-editor/compile-delay").toInt());
|
||||
}
|
||||
|
||||
CSVWorld::ScriptSubView::ScriptSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||
|
@ -144,6 +145,10 @@ void CSVWorld::ScriptSubView::updateUserSetting (const QString& name, const QStr
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (name=="script-editor/compile-delay")
|
||||
{
|
||||
mCompileDelay->setInterval (value.at (0).toInt());
|
||||
}
|
||||
|
||||
if (mButtons)
|
||||
mButtons->updateUserSetting (name, value);
|
||||
|
|
Loading…
Reference in a new issue