- fix: While Control is pressed, can't start Drag&Drop by mouse.
This commit is contained in:
parent
4016c96c96
commit
6d3597db29
3
NEWS.md
3
NEWS.md
|
@ -1,12 +1,13 @@
|
|||
Red Panda C++ Version 3.2
|
||||
|
||||
- Change: The way to calcuate astyle path.
|
||||
- change: The way to calcuate astyle path.
|
||||
- fix: Scroll bar arrow size not correct in the dark themes.
|
||||
- fix: Don't auto scroll to the caret after undo/redo.
|
||||
- fix: "bits/stdc++" is not openned in readonly mode.
|
||||
- fix: astyle path error when reformat.
|
||||
- fix: Slow when paste/replace bulk contents.
|
||||
- fix: Crash in windows 7.
|
||||
- fix: While Control is pressed, can't start Drag&Drop by mouse.
|
||||
|
||||
Red Panda C++ Version 3.1
|
||||
|
||||
|
|
|
@ -1169,7 +1169,7 @@ void Editor::keyReleaseEvent(QKeyEvent *event)
|
|||
|
||||
void Editor::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if(event->modifiers() == Qt::ControlModifier) {
|
||||
if(event->modifiers() == Qt::ControlModifier && !selAvail()) {
|
||||
cancelHint();
|
||||
|
||||
QSynedit::BufferCoord p;
|
||||
|
@ -1185,7 +1185,6 @@ void Editor::mouseMoveEvent(QMouseEvent *event)
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
QSynedit::QSynEdit::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
|
@ -1486,8 +1485,7 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
|||
{
|
||||
// if ctrl+clicked
|
||||
if ((event->modifiers() == Qt::ControlModifier)
|
||||
&& (event->button() == Qt::LeftButton)) {
|
||||
if (!selAvail() ) {
|
||||
&& (event->button() == Qt::LeftButton) && !selAvail()) {
|
||||
QSynedit::BufferCoord p;
|
||||
if (mParser && pointToCharLine(event->pos(),p)) {
|
||||
cancelHoverLink();
|
||||
|
@ -1506,7 +1504,6 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QSynedit::QSynEdit::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
|
@ -4618,16 +4615,6 @@ void Editor::setCanAutoSave(bool newCanAutoSave)
|
|||
mCanAutoSave = newCanAutoSave;
|
||||
}
|
||||
|
||||
void Editor::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if ((event->modifiers() == Qt::ControlModifier)
|
||||
&& (event->button() == Qt::LeftButton)) {
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
QSynedit::QSynEdit::mousePressEvent(event);
|
||||
}
|
||||
|
||||
const QDateTime &Editor::hideTime() const
|
||||
{
|
||||
return mHideTime;
|
||||
|
|
|
@ -387,26 +387,11 @@ private:
|
|||
|
||||
static QHash<ParserLanguage,std::weak_ptr<CppParser>> mSharedParsers;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void keyReleaseEvent(QKeyEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
||||
// SynEdit interface
|
||||
protected:
|
||||
void onGutterPaint(QPainter &painter, int aLine, int X, int Y) override;
|
||||
void onGetEditingAreas(int Line, QSynedit::EditingAreaList &areaList) override;
|
||||
|
||||
// SynEdit interface
|
||||
protected:
|
||||
bool onGetSpecialLineColors(int Line, QColor &foreground, QColor &backgroundColor) override;
|
||||
|
||||
// SynEdit interface
|
||||
protected:
|
||||
void onPreparePaintHighlightToken(int line, int aChar, const QString &token, QSynedit::PTokenAttribute attr, QSynedit::FontStyles &style, QColor &foreground, QColor &background) override;
|
||||
|
||||
// QObject interface
|
||||
|
@ -431,18 +416,18 @@ public:
|
|||
quint64 lastFocusOutTime() const;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
// QWidget interface
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void keyReleaseEvent(QKeyEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void inputMethodEvent(QInputMethodEvent *) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
|
||||
};
|
||||
|
||||
|
|
|
@ -6051,7 +6051,6 @@ void QSynEdit::mousePressEvent(QMouseEvent *event)
|
|||
|
||||
QAbstractScrollArea::mousePressEvent(event);
|
||||
|
||||
|
||||
BufferCoord oldCaret=caretXY();
|
||||
if (button == Qt::RightButton) {
|
||||
if (mOptions.testFlag(EditorOption::RightMouseMovesCursor) &&
|
||||
|
|
Loading…
Reference in New Issue