Skip to content

Commit

Permalink
fixes Enable/Disable line number of MacroEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeeps708 authored and wwmayer committed Apr 20, 2016
1 parent a80b077 commit e5cb8db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Gui/TextEdit.cpp
Expand Up @@ -443,6 +443,15 @@ void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReaso
int fontSize = metric.width(QLatin1String("0"));
setTabStopWidth(tabWidth * fontSize);
}

// Enables/Disables Line number in the Macro Editor from Edit->Preferences->Editor menu.
QRect cr = contentsRect();
bool show = hPrefGrp->GetBool( "EnableLineNumber", true );
if(show) {
lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height()));
} else {
lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), 0, cr.height()));
}
}

void TextEditor::paintEvent (QPaintEvent * e)
Expand Down

0 comments on commit e5cb8db

Please sign in to comment.