Version 0.12.1 For Dev-C++ 7 Beta

- fix: error when drag&drop in editors
This commit is contained in:
Roy Qu 2021-12-23 22:05:57 +08:00
parent b956dbbcab
commit 0f3baaac00
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,6 @@
Version 0.12.1 For Dev-C++ 7 Beta
- fix: error when drag&drop in editors
Version 0.12.0 For Dev-C++ 7 Beta Version 0.12.0 For Dev-C++ 7 Beta
- enhancement: enable run/debug/compile when console program finished but pausing. - enhancement: enable run/debug/compile when console program finished but pausing.

View File

@ -653,7 +653,7 @@ bool Project::assignTemplate(const std::shared_ptr<ProjectTemplate> aTemplate, b
PTemplateUnit templateUnit = aTemplate->unit(i); PTemplateUnit templateUnit = aTemplate->unit(i);
QString s; QString s;
PProjectUnit unit; PProjectUnit unit;
if (options().useGPP) { if (mOptions.useGPP) {
s = templateUnit->CppText; s = templateUnit->CppText;
unit = newUnit(mNode, templateUnit->CppName); unit = newUnit(mNode, templateUnit->CppName);
} else { } else {

View File

@ -205,6 +205,8 @@ void SynEdit::setCaretY(int value)
void SynEdit::setCaretXY(const BufferCoord &value) void SynEdit::setCaretXY(const BufferCoord &value)
{ {
setBlockBegin(value);
setBlockEnd(value);
setCaretXYEx(true,value); setCaretXYEx(true,value);
} }
@ -6184,7 +6186,7 @@ void SynEdit::dragEnterEvent(QDragEnterEvent *event)
mDragSelEndSave = blockEnd(); mDragSelEndSave = blockEnd();
BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(), BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(),
event->pos().y())); event->pos().y()));
setCaretXY(coord); internalSetCaretXY(coord);
setBlockBegin(mDragSelBeginSave); setBlockBegin(mDragSelBeginSave);
setBlockEnd(mDragSelEndSave); setBlockEnd(mDragSelEndSave);
showCaret(); showCaret();
@ -6221,7 +6223,6 @@ void SynEdit::dropEvent(QDropEvent *event)
//paste to new position //paste to new position
setTopLine(topLine); setTopLine(topLine);
setLeftChar(leftChar); setLeftChar(leftChar);
setCaretXY(coord);
setSelText(event->mimeData()->text()); setSelText(event->mimeData()->text());
//delete old //delete old
setBlockBegin(mDragSelBeginSave); setBlockBegin(mDragSelBeginSave);
@ -6246,6 +6247,7 @@ void SynEdit::dropEvent(QDropEvent *event)
} }
mUndoList->EndBlock(); mUndoList->EndBlock();
} }
event->acceptProposedAction(); event->acceptProposedAction();
} }

View File

@ -2,6 +2,6 @@
#define VERSION_H #define VERSION_H
#include <QObject> #include <QObject>
#define DEVCPP_VERSION "beta.0.11.5" #define DEVCPP_VERSION "beta.0.12.1"
#endif // VERSION_H #endif // VERSION_H