diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-19 18:27:47 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-19 18:27:47 (GMT) |
commit | 05b2eb1b90620025ba9242477b0df688745dd0db (patch) | |
tree | cfa890ef8e4bb5182ba988cf817c482e2fc639e1 /mainwin.cc | |
parent | 7c998717209c4ea3cd8edf329baa3e5040d15266 (diff) |
Clifford Wolf:
Fixed scalar subtraction
Fixed handling of -/+ scalar prefix
Fixed vector handling [0 1 2] doesn't work anymore now
git-svn-id: http://svn.clifford.at/openscad/trunk@109 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r-- | mainwin.cc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -354,8 +354,12 @@ void MainWindow::compile(bool procevents) root_ctx.set_variable("$t", Value(e_tval->text().toDouble())); root_module = parse(editor->toPlainText().toAscii().data(), false); - if (!root_module) + if (!root_module) { + QTextCursor cursor = editor->textCursor(); + cursor.setPosition(parser_error_pos); + editor->setTextCursor(cursor); goto fail; + } PRINT("Compiling design (CSG Tree generation)..."); if (procevents) @@ -608,7 +612,7 @@ void MainWindow::pasteViewportTranslation() { QTextCursor cursor = editor->textCursor(); QString txt; - txt.sprintf("[ %.2f %.2f %.2f ]", -screen->object_trans_x, -screen->object_trans_y, -screen->object_trans_z); + txt.sprintf("[ %.2f, %.2f, %.2f ]", -screen->object_trans_x, -screen->object_trans_y, -screen->object_trans_z); cursor.insertText(txt); } @@ -616,7 +620,7 @@ void MainWindow::pasteViewportRotation() { QTextCursor cursor = editor->textCursor(); QString txt; - txt.sprintf("[ %.2f %.2f %.2f ]", + txt.sprintf("[ %.2f, %.2f, %.2f ]", fmodf(360 - screen->object_rot_x + 90, 360), fmodf(360 - screen->object_rot_y, 360), fmodf(360 - screen->object_rot_z, 360)); cursor.insertText(txt); } |