Skip to content

Commit

Permalink
editbox: reset additional variables for new program
Browse files Browse the repository at this point in the history
the extra selections, line count, modified line and modified list is new
variables also need to be reset when the document is cleared; also
removed an unused member variable
  • Loading branch information
thunder422 committed Jan 11, 2014
1 parent b795a47 commit 96557e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions editbox.cpp
Expand Up @@ -509,6 +509,10 @@ void EditBox::clear()
{
m_ignoreChange = true;
QPlainTextEdit::clear();
m_extraSelections.clear();
m_lineCount = 0;
m_modifiedLine = -1;
m_modifiedLineIsNew = false;
m_ignoreChange = false;
}

Expand Down
1 change: 0 additions & 1 deletion editbox.h
Expand Up @@ -93,7 +93,6 @@ private slots:
ProgramModel *m_programUnit; // pointer to program unit being edited
int m_modifiedLine; // current line that has been modified
bool m_modifiedLineIsNew; // modified line is a new line flag
int m_modifiedLineOffset; // compensate for lines inserted/deleted
QWidget *m_lineNumberWidget; // widget to display line numbers
int m_lineCount; // total document line count
QList<QTextEdit::ExtraSelection>
Expand Down

0 comments on commit 96557e5

Please sign in to comment.