fixes Enable/Disable line number of MacroEditor

This commit is contained in:
mandeeps708 2016-04-20 00:43:11 +05:30 committed by wmayer
parent a80b077ff8
commit e5cb8db3ce

View File

@ -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)