Skip to content

Commit

Permalink
CellML Text viewer: fixed a problem with Unicode characters (opencor#…
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Dec 20, 2018
1 parent 2b5f948 commit 02c6e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -1199,7 +1199,8 @@ void CellmlTextViewWidget::updateViewer()

forever {
if (isComment(fromPosition) || currentStatement[shift].isSpace()) {
++fromPosition;
fromPosition += QString(currentStatement[shift]).toUtf8().size();

++shift;
} else {
break;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/widget/EditorWidget/src/editorwidget.cpp
Expand Up @@ -645,7 +645,7 @@ int EditorWidget::styleAt(int pPosition) const
// Return the style used at the given position

return int(mEditor->SendScintilla(QsciScintilla::SCI_GETSTYLEAT,
mEditor->text().left(pPosition).toUtf8().length()));
pPosition));
}

//==============================================================================
Expand Down

0 comments on commit 02c6e42

Please sign in to comment.