- fix: Can't undo & save after copy by drag with mouse.

This commit is contained in:
Roy Qu 2023-03-10 09:12:22 +08:00
parent 3b56bab68b
commit e9247f6476
4 changed files with 8 additions and 12 deletions

View File

@ -18,6 +18,7 @@ Red Panda C++ Version 2.17
- enhancement: Shift+Down in the last line will expand selection to the end of the line.
- enhancement: If no selection, Ctrl+C (Copy) auto selects the current line and put the cursor to the beginning.
- fix: Chinese characters in the source code is not correctly displayed in the CPU info window.
- fix: Can't undo & save after copy by drag with mouse.
Red Panda C++ Version 2.16

View File

@ -129,7 +129,7 @@ SOURCES += \
settingsdialog/executorproblemsetwidget.cpp \
settingsdialog/formattergeneralwidget.cpp \
settingsdialog/languageasmgenerationwidget.cpp \
settingsdialog/languagecformatwidget.cpp \
# settingsdialog/languagecformatwidget.cpp \
settingsdialog/projectcompileparamaterswidget.cpp \
settingsdialog/projectcompilerwidget.cpp \
settingsdialog/projectdirectorieswidget.cpp \
@ -265,7 +265,7 @@ HEADERS += \
settingsdialog/executorproblemsetwidget.h \
settingsdialog/formattergeneralwidget.h \
settingsdialog/languageasmgenerationwidget.h \
settingsdialog/languagecformatwidget.h \
# settingsdialog/languagecformatwidget.h \
settingsdialog/projectcompileparamaterswidget.h \
settingsdialog/projectcompilerwidget.h \
settingsdialog/projectdirectorieswidget.h \
@ -373,7 +373,7 @@ FORMS += \
settingsdialog/executorproblemsetwidget.ui \
settingsdialog/formattergeneralwidget.ui \
settingsdialog/languageasmgenerationwidget.ui \
settingsdialog/languagecformatwidget.ui \
# settingsdialog/languagecformatwidget.ui \
settingsdialog/projectcompileparamaterswidget.ui \
settingsdialog/projectcompilerwidget.ui \
settingsdialog/projectdirectorieswidget.ui \

View File

@ -1,7 +1,7 @@
#include "cppformatter.h"
#include "../qsynedit.h"
#include "../syntaxer/cpp.h"
#include <QDebug>
namespace QSynedit {
CppFormatter::CppFormatter()
@ -53,15 +53,13 @@ namespace QSynedit {
&& lineText.endsWith(':')
&& (
(getBoolOption("IndentClassMemberVisibilityKeywords",true)
&& (
( (
firstToken == "public" || firstToken == "private"
|| firstToken == "protected"
)
)
||
(getBoolOption("IndentSwitchCases",true)
&& (
( (
firstToken == "case"
|| firstToken == "default"
)
@ -135,7 +133,5 @@ namespace QSynedit {
void CppFormatter::doInitOptions()
{
mOptions.insert("IndentClassMemberVisibilityKeywords",true);
mOptions.insert("IndentSwitchCases",true);
}
}

View File

@ -6388,9 +6388,8 @@ void QSynEdit::dropEvent(QDropEvent *event)
}
}
}
endEditing();
}
endEditing();
event->acceptProposedAction();
mDropped = true;
setTopLine(topLine);