- fix: scroll bar not correctly updated when collapse/uncollapse folders
This commit is contained in:
parent
331a5818c6
commit
5743991152
1
NEWS.md
1
NEWS.md
|
@ -14,6 +14,7 @@ Red Panda C++ Version 1.0.4
|
|||
- fix: crash when eval statements like "fsm::stack fsm;"
|
||||
- enhancement: add Traditional Chinese translation
|
||||
- fix: index of the longest line not correctly updated ( which will cause selection errors)
|
||||
- fix: scroll bar not correctly updated when collapse/uncollapse folders
|
||||
|
||||
Red Panda C++ Version 1.0.3
|
||||
- fix: when oj problem grabbed by competitive companion received,
|
||||
|
|
|
@ -140,6 +140,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
mCompilerSet = new QComboBox();
|
||||
mCompilerSet->setMinimumWidth(200);
|
||||
mCompilerSet->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
ui->toolbarCompilerSet->addWidget(mCompilerSet);
|
||||
connect(mCompilerSet,QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &MainWindow::onCompilerSetChanged);
|
||||
|
|
|
@ -1142,16 +1142,20 @@ bool SynEdit::inputMethodOn()
|
|||
|
||||
void SynEdit::collapseAll()
|
||||
{
|
||||
incPaintLock();
|
||||
for (int i = mAllFoldRanges.count()-1;i>=0;i--){
|
||||
collapse(mAllFoldRanges[i]);
|
||||
}
|
||||
decPaintLock();
|
||||
}
|
||||
|
||||
void SynEdit::unCollpaseAll()
|
||||
{
|
||||
incPaintLock();
|
||||
for (int i = mAllFoldRanges.count()-1;i>=0;i--){
|
||||
uncollapse(mAllFoldRanges[i]);
|
||||
}
|
||||
decPaintLock();
|
||||
}
|
||||
|
||||
void SynEdit::processGutterClick(QMouseEvent *event)
|
||||
|
@ -3434,6 +3438,7 @@ void SynEdit::uncollapse(PSynEditFoldRange FoldRange)
|
|||
|
||||
// Redraw fold mark
|
||||
invalidateGutterLines(FoldRange->fromLine, INT_MAX);
|
||||
updateScrollbars();
|
||||
}
|
||||
|
||||
void SynEdit::collapse(PSynEditFoldRange FoldRange)
|
||||
|
@ -3452,6 +3457,8 @@ void SynEdit::collapse(PSynEditFoldRange FoldRange)
|
|||
|
||||
// Redraw fold mark
|
||||
invalidateGutterLines(FoldRange->fromLine, INT_MAX);
|
||||
|
||||
updateScrollbars();
|
||||
}
|
||||
|
||||
void SynEdit::foldOnListInserted(int Line, int Count)
|
||||
|
|
Loading…
Reference in New Issue