diff --git a/highlighter.cc b/highlighter.cc index 7543b4d7..017d6b21 100644 --- a/highlighter.cc +++ b/highlighter.cc @@ -36,6 +36,7 @@ void Highlighter::highlightBlock(const QString &text) QTextCharFormat style; style.setBackground(Qt::red); setFormat(0, text.size(), style); + style.setBackground(Qt::black); style.setForeground(Qt::white); setFormat(parser_error_pos - n, 1, style); } diff --git a/mainwin.cc b/mainwin.cc index d63990e6..cf17c88e 100644 --- a/mainwin.cc +++ b/mainwin.cc @@ -415,12 +415,8 @@ void MainWindow::compile(bool procevents) delete highlighter; highlighter = new Highlighter(editor->document()); - if (!root_module) { - QTextCursor cursor = editor->textCursor(); - cursor.setPosition(parser_error_pos); - editor->setTextCursor(cursor); + if (!root_module) goto fail; - } PRINT("Compiling design (CSG Tree generation)..."); if (procevents) diff --git a/render.cc b/render.cc index cfbd51ed..3bb07de7 100644 --- a/render.cc +++ b/render.cc @@ -220,7 +220,7 @@ CSGTerm *RenderNode::render_csg_term(double m[16], QVector *highlights QString RenderNode::dump(QString indent) const { if (dump_cache.isEmpty()) { - QString text = indent + QString("n%1: ").arg(idx) + QString("render() {\n"); + QString text = indent + QString("n%1: ").arg(idx) + QString("render(convexity = %1) {\n").arg(QString::number(convexity)); foreach (AbstractNode *v, children) text += v->dump(indent + QString("\t")); ((AbstractNode*)this)->dump_cache = text + indent + "}\n";