|
|
|
@ -52,7 +52,7 @@ CSVWorld::ScriptEdit::ScriptEdit(
|
|
|
|
|
mWhiteListQoutes("^[a-z|_]{1}[a-z|0-9|_]{0,}$", Qt::CaseInsensitive)
|
|
|
|
|
{
|
|
|
|
|
wrapLines(false);
|
|
|
|
|
setTabStopWidth (4);
|
|
|
|
|
setTabWidth();
|
|
|
|
|
setUndoRedoEnabled (false); // we use OpenCS-wide undo/redo instead
|
|
|
|
|
|
|
|
|
|
mAllowedTypes <<CSMWorld::UniversalId::Type_Journal
|
|
|
|
@ -194,6 +194,13 @@ bool CSVWorld::ScriptEdit::stringNeedsQuote (const std::string& id) const
|
|
|
|
|
return !(string.contains(mWhiteListQoutes));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::ScriptEdit::setTabWidth()
|
|
|
|
|
{
|
|
|
|
|
const int numCharacters = 4;
|
|
|
|
|
QFontMetrics metrics(mMonoFont);
|
|
|
|
|
setTabStopWidth(numCharacters * metrics.width(' '));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::ScriptEdit::wrapLines(bool wrap)
|
|
|
|
|
{
|
|
|
|
|
if (wrap)
|
|
|
|
|