mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 08:09:39 +00:00
make compilation delay configurable via a user setting
This commit is contained in:
parent
73b6df8280
commit
8763a3b3c3
2 changed files with 12 additions and 1 deletions
|
@ -319,6 +319,12 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
||||||
Setting *toolbar = createSetting (Type_CheckBox, "toolbar", "Show toolbar");
|
Setting *toolbar = createSetting (Type_CheckBox, "toolbar", "Show toolbar");
|
||||||
toolbar->setDefaultValue ("true");
|
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");
|
Setting *formatInt = createSetting (Type_LineEdit, "colour-int", "Highlight Colour: Int");
|
||||||
formatInt->setDefaultValues (QStringList() << "Dark magenta");
|
formatInt->setDefaultValues (QStringList() << "Dark magenta");
|
||||||
formatInt->setToolTip ("(Default: Green) Use one of the following formats:" + tooltip);
|
formatInt->setToolTip ("(Default: Green) Use one of the following formats:" + tooltip);
|
||||||
|
|
|
@ -39,7 +39,8 @@ void CSVWorld::ScriptSubView::addButtonBar()
|
||||||
void CSVWorld::ScriptSubView::recompile()
|
void CSVWorld::ScriptSubView::recompile()
|
||||||
{
|
{
|
||||||
if (!mCompileDelay->isActive())
|
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)
|
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)
|
if (mButtons)
|
||||||
mButtons->updateUserSetting (name, value);
|
mButtons->updateUserSetting (name, value);
|
||||||
|
|
Loading…
Reference in a new issue