From 49080b88e19403803ea940d5433780e5c93d6dc6 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 17 Mar 2022 20:57:43 +0800 Subject: [PATCH] - change: remove shortcuts for line/column mode --- NEWS.md | 1 + RedPandaIDE/qsynedit/KeyStrokes.cpp | 6 +++--- RedPandaIDE/qsynedit/SynEdit.cpp | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index ea0a57dd..0d9f9591 100644 --- a/NEWS.md +++ b/NEWS.md @@ -37,6 +37,7 @@ Red Panda C++ Version 1.0.0 - fix: hits in the search view not correctly displayed (overlapped with others) - enhancement: auto convert project icon to ico format - fix: correctly reparse modified project files when rename symbol + - change: remove shortcuts for line/column mode Red Panda C++ Version 0.14.5 - fix: the "gnu c++ 20" option in compiler set options is wrong diff --git a/RedPandaIDE/qsynedit/KeyStrokes.cpp b/RedPandaIDE/qsynedit/KeyStrokes.cpp index 43ba1003..fe297d23 100644 --- a/RedPandaIDE/qsynedit/KeyStrokes.cpp +++ b/RedPandaIDE/qsynedit/KeyStrokes.cpp @@ -267,8 +267,8 @@ void SynEditKeyStrokes::resetDefaults() // add(SynEditorCommand::ecSetMarker7, Qt::Key_7, Qt::ControlModifier | Qt::ShiftModifier); // add(SynEditorCommand::ecSetMarker8, Qt::Key_8, Qt::ControlModifier | Qt::ShiftModifier); // add(SynEditorCommand::ecSetMarker9, Qt::Key_9, Qt::ControlModifier | Qt::ShiftModifier); - add(SynEditorCommand::ecNormalSelect, Qt::Key_N, Qt::ControlModifier | Qt::ShiftModifier); - add(SynEditorCommand::ecColumnSelect, Qt::Key_C, Qt::ControlModifier | Qt::ShiftModifier); - add(SynEditorCommand::ecLineSelect, Qt::Key_L, Qt::ControlModifier | Qt::ShiftModifier); +// add(SynEditorCommand::ecNormalSelect, Qt::Key_N, Qt::ControlModifier | Qt::ShiftModifier); +// add(SynEditorCommand::ecColumnSelect, Qt::Key_C, Qt::ControlModifier | Qt::ShiftModifier); +// add(SynEditorCommand::ecLineSelect, Qt::Key_L, Qt::ControlModifier | Qt::ShiftModifier); // add(SynEditorCommand::ecMatchBracket, Qt::Key_B, Qt::ControlModifier | Qt::ShiftModifier); } diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index 105a7d2f..26960008 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -4190,7 +4190,7 @@ void SynEdit::doUndoItem() Item->changeReason(), caretXY(), caretXY(), "", - mActiveSelectionMode); + Item->changeSelMode()); internalSetCaretXY(Item->changeStartPos()); break; case SynChangeReason::crSelection: @@ -4199,7 +4199,7 @@ void SynEdit::doUndoItem() blockBegin(), blockEnd(), "", - mActiveSelectionMode); + Item->changeSelMode()); setCaretAndSelection(caretXY(), Item->changeStartPos(), Item->changeEndPos()); break; case SynChangeReason::crInsert: @@ -5713,6 +5713,7 @@ void SynEdit::ExecuteCommand(SynEditorCommand Command, QChar AChar, void *pData) setSelectionMode(SynSelectionMode::smNormal); break; case SynEditorCommand::ecLineSelect: + qDebug()<<"????"; setSelectionMode(SynSelectionMode::smLine); break; case SynEditorCommand::ecColumnSelect: