minor change
This commit is contained in:
parent
98f4766ffd
commit
8e771bd322
|
@ -1609,7 +1609,7 @@ void Editor::onStatusChanged(QSynedit::StatusChanges changes)
|
|||
// Is there a bracket char before us?
|
||||
int lineLength = lineText().length();
|
||||
int ch = caretX() - 2;
|
||||
QSynedit::BufferCoord coord;
|
||||
QSynedit::BufferCoord coord{0,0};
|
||||
if (ch>=0 && ch<lineLength && isBraceChar(lineText()[ch]) ) {
|
||||
coord.ch = ch+1;
|
||||
coord.line = caretY();
|
||||
|
|
|
@ -6129,16 +6129,16 @@ void SynEdit::resizeEvent(QResizeEvent *)
|
|||
{
|
||||
//resize the cache image
|
||||
qreal dpr = devicePixelRatioF();
|
||||
std::shared_ptr<QImage> image = std::make_shared<QImage>(clientWidth()*dpr,clientHeight()*dpr,
|
||||
mContentImage = std::make_shared<QImage>(clientWidth()*dpr,clientHeight()*dpr,
|
||||
QImage::Format_ARGB32);
|
||||
image->setDevicePixelRatio(dpr);
|
||||
QRect newRect = image->rect().intersected(mContentImage->rect());
|
||||
mContentImage->setDevicePixelRatio(dpr);
|
||||
// QRect newRect = image->rect().intersected(mContentImage->rect());
|
||||
|
||||
QPainter painter(image.get());
|
||||
// QPainter painter(image.get());
|
||||
|
||||
painter.drawImage(newRect,*mContentImage);
|
||||
//painter.drawImage(newRect,*mContentImage);
|
||||
|
||||
mContentImage = image;
|
||||
// mContentImage = image;
|
||||
|
||||
onSizeOrFontChanged(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue