Add persistence to Python console word wrap
This commit is contained in:
committed by
Yorik van Havre
parent
daa7d31242
commit
f60dd25fb8
@@ -371,7 +371,15 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
|
||||
// Python console
|
||||
PythonConsole* pcPython = new PythonConsole(this);
|
||||
pcPython->setWordWrapMode(QTextOption::NoWrap);
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("General");
|
||||
|
||||
if (hGrp->GetBool("PythonWordWrap", true)) {
|
||||
pcPython->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
|
||||
} else {
|
||||
pcPython->setWordWrapMode(QTextOption::NoWrap);
|
||||
}
|
||||
|
||||
pcPython->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
pcPython->setObjectName
|
||||
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Python console")));
|
||||
|
||||
Reference in New Issue
Block a user