- fix: option "don't add leading zeros to line numbers" not work

This commit is contained in:
royqh1979 2021-11-13 17:15:07 +08:00
parent 966aac5d4a
commit c4b61b8985
5 changed files with 13 additions and 9 deletions

View File

@ -8,6 +8,7 @@ Version 0.8.7 For Dev-C++ 7 Beta
- enhancement: shift+mouse wheel to scroll horizontally - enhancement: shift+mouse wheel to scroll horizontally
- fix: greatly reduces paste time - fix: greatly reduces paste time
- fix: auto indent shouldn't use preprocessor's indent to calculate - fix: auto indent shouldn't use preprocessor's indent to calculate
- fix: option "don't add leading zeros to line numbers" not work
Version 0.8.6 For Dev-C++ 7 Beta Version 0.8.6 For Dev-C++ 7 Beta
- enhancement: greatly reduces memory usage for symbol parsing ( memory needed for bits/stdc++.h reduced from 150m+ to 80m+) - enhancement: greatly reduces memory usage for symbol parsing ( memory needed for bits/stdc++.h reduced from 150m+ to 80m+)

View File

@ -48,7 +48,7 @@ bool CppRefacter::findOccurence(Editor *editor, const BufferCoord &pos)
bool CppRefacter::findOccurence(const QString &statementFullname, SearchFileScope scope) bool CppRefacter::findOccurence(const QString &statementFullname, SearchFileScope scope)
{ {
PCppParser parser; PCppParser parser;
Editor * editor; Editor * editor=nullptr;
std::shared_ptr<Project> project; std::shared_ptr<Project> project;
if (scope == SearchFileScope::currentFile) { if (scope == SearchFileScope::currentFile) {
editor = pMainWindow->editorList()->getEditor(); editor = pMainWindow->editorList()->getEditor();

View File

@ -95,7 +95,11 @@ QString SynGutter::formatLineNumber(int line)
{ {
line += (mLineNumberStart - 1); line += (mLineNumberStart - 1);
QString result = QString::number(line); QString result = QString::number(line);
if (mLeadingZeros) {
return QString(mAutoSizeDigitCount - result.length(),'0') + result; return QString(mAutoSizeDigitCount - result.length(),'0') + result;
} else {
return result;
}
} }
int SynGutter::realGutterWidth(int charWidth) int SynGutter::realGutterWidth(int charWidth)
@ -315,10 +319,9 @@ void SynGutter::setBorderColor(const QColor &value)
} }
SynEditMark::SynEditMark(QObject *parent) SynEditMark::SynEditMark(QObject * /*parent*/)
{ {
mBookmarkNum = -1; mBookmarkNum = -1;
} }
int SynEditMark::Char() const int SynEditMark::Char() const
@ -405,7 +408,7 @@ void SynEditMark::setLine(int line)
} }
} }
SynBookMarkOpt::SynBookMarkOpt(QObject *parent) SynBookMarkOpt::SynBookMarkOpt(QObject */*parent*/)
{ {
mDrawBookmarksFirst = true; mDrawBookmarksFirst = true;
mEnableKeys = true; mEnableKeys = true;

View File

@ -5991,7 +5991,7 @@ void SynEdit::mouseMoveEvent(QMouseEvent *event)
mimeData->setText(selText()); mimeData->setText(selText());
drag->setMimeData(mimeData); drag->setMimeData(mimeData);
Qt::DropAction dropAction = drag->exec(Qt::CopyAction | Qt::MoveAction); drag->exec(Qt::CopyAction | Qt::MoveAction);
//drag->setPixmap(iconPixmap); //drag->setPixmap(iconPixmap);
//BeginDrag(false); //BeginDrag(false);
} }
@ -6146,7 +6146,7 @@ void SynEdit::dragMoveEvent(QDragMoveEvent *event)
showCaret(); showCaret();
} }
void SynEdit::dragLeaveEvent(QDragLeaveEvent *event) void SynEdit::dragLeaveEvent(QDragLeaveEvent *)
{ {
setCaretXY(mDragCaretSave); setCaretXY(mDragCaretSave);
setBlockBegin(mDragSelBeginSave); setBlockBegin(mDragSelBeginSave);

View File

@ -807,8 +807,8 @@ void DarkFusionStyle::drawControl(ControlElement element, const QStyleOption *op
case CE_MenuItem: case CE_MenuItem:
// Draws one item in a popup menu. // Draws one item in a popup menu.
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
QColor highlightOutline = highlightedOutline; //QColor highlightOutline = highlightedOutline;
QColor highlight = option->palette.highlight().color(); //QColor highlight = option->palette.highlight().color();
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
painter->save(); painter->save();
int w = 0; int w = 0;