summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-11-01 18:26:38 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-11-01 18:26:38 (GMT)
commit57c3213abbee91ee86fb8eab713cbeef2f470bc3 (patch)
treede87f3953853d2f77d95d3d6d02f20790acc6432 /mainwin.cc
parent2104ddafd9ea2866bfadb03f0c0286ca30696500 (diff)
Clifford Wolf:
Added syntax error highlighting git-svn-id: http://svn.clifford.at/openscad/trunk@127 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/mainwin.cc b/mainwin.cc
index 19f558a..d63990e 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -80,6 +80,7 @@ MainWindow::MainWindow(const char *filename)
s1 = new QSplitter(Qt::Horizontal, this);
editor = new QTextEdit(s1);
+ highlighter = new Highlighter(editor->document());
QFont font;
font.setStyleHint(QFont::TypeWriter);
@@ -411,6 +412,9 @@ void MainWindow::compile(bool procevents)
root_module = parse(editor->toPlainText().toAscii().data(), false);
+ delete highlighter;
+ highlighter = new Highlighter(editor->document());
+
if (!root_module) {
QTextCursor cursor = editor->textCursor();
cursor.setPosition(parser_error_pos);
@@ -861,7 +865,11 @@ void MainWindow::actionDisplayCSGProducts()
current_win = NULL;
}
+#ifdef ENABLE_CGAL
void MainWindow::actionExportSTLorOFF(bool stl_mode)
+#else
+void MainWindow::actionExportSTLorOFF(bool)
+#endif
{
current_win = this;
contact: Jan Huwald // Impressum