19 #include "src/settingseditor/settingseditor.h" |
19 #include "src/settingseditor/settingseditor.h" |
20 #include "src/ui/circletooloptionswidget.h" |
20 #include "src/ui/circletooloptionswidget.h" |
21 #include "src/version.h" |
21 #include "src/version.h" |
22 #include "src/widgets/colorselectdialog.h" |
22 #include "src/widgets/colorselectdialog.h" |
23 #include "src/parser.h" |
23 #include "src/parser.h" |
|
24 #include "src/ldrawsyntaxhighlighter.h" |
24 #include <GL/glew.h> |
25 #include <GL/glew.h> |
25 |
26 |
26 static const QDir LOCALE_DIR {":/locale"}; |
27 static const QDir LOCALE_DIR {":/locale"}; |
27 |
28 |
28 class ModelSubWindow : public QMdiSubWindow |
29 class ModelSubWindow : public QMdiSubWindow |
527 ::save(*model, &stream); |
528 ::save(*model, &stream); |
528 data->textbuffer = std::make_unique<QTextDocument>(); |
529 data->textbuffer = std::make_unique<QTextDocument>(); |
529 data->textbuffer->setPlainText(modeltext); |
530 data->textbuffer->setPlainText(modeltext); |
530 data->textbuffer->setDefaultFont(monospace()); |
531 data->textbuffer->setDefaultFont(monospace()); |
531 data->textbuffer->setDocumentLayout(new QPlainTextDocumentLayout(data->textbuffer.get())); |
532 data->textbuffer->setDocumentLayout(new QPlainTextDocumentLayout(data->textbuffer.get())); |
|
533 new LDrawSyntaxHighlighter{data->textbuffer.get()}; |
532 data->textcursor = std::make_unique<QTextCursor>(data->textbuffer.get()); |
534 data->textcursor = std::make_unique<QTextCursor>(data->textbuffer.get()); |
533 documents.setModelPayload(modelId, data); |
535 documents.setModelPayload(modelId, data); |
534 QObject::connect( |
536 QObject::connect( |
535 data->tools.get(), |
537 data->tools.get(), |
536 &EditTools::modelAction, |
538 &EditTools::modelAction, |