Gui: Remove code duplication in PythonConsole class

This commit is contained in:
wmayer
2024-12-25 19:19:23 +01:00
committed by Yorik van Havre
parent 0dba0a3b31
commit d979235a48
4 changed files with 25 additions and 55 deletions

View File

@@ -441,18 +441,6 @@ void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReaso
}
lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), width, cr.height()));
}
if (strcmp(sReason, "EnableBlockCursor") == 0 ||
strcmp(sReason, "FontSize") == 0 ||
strcmp(sReason, "Font") == 0) {
bool block = hPrefGrp->GetBool("EnableBlockCursor", false);
if (block) {
setCursorWidth(QFontMetrics(font()).averageCharWidth());
}
else {
setCursorWidth(1);
}
}
}
// ------------------------------------------------------------------------------