- enhancement: press alt to switch to column selection mode while selection by mouse dragging in editor

This commit is contained in:
Roy Qu 2022-03-19 10:27:31 +08:00
parent 2e77734d67
commit 49297431b6
3 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@ Red Panda C++ Version 1.0.1
- fix: only convert project icon file when it's filename doesn't end with ".ico" - fix: only convert project icon file when it's filename doesn't end with ".ico"
- fix: hide function tip when scroll - fix: hide function tip when scroll
- fix: short cut for goto definition/declaration doesn't work - fix: short cut for goto definition/declaration doesn't work
- enhancement: press alt to switch to column selection mode while selection by mouse dragging in editor
Red Panda C++ Version 1.0.0 Red Panda C++ Version 1.0.0
- fix: calculation for code snippets's tab stop positions is not correct - fix: calculation for code snippets's tab stop positions is not correct

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1114</width> <width>1114</width>
<height>742</height> <height>627</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">

View File

@ -6063,6 +6063,10 @@ void SynEdit::mouseMoveEvent(QMouseEvent *event)
//BeginDrag(false); //BeginDrag(false);
} }
} else if ((buttons == Qt::LeftButton)) { } else if ((buttons == Qt::LeftButton)) {
if (event->modifiers() == Qt::AltModifier)
setSelectionMode(SynSelectionMode::smColumn);
else
setSelectionMode(SynSelectionMode::smNormal);
// should we begin scrolling? // should we begin scrolling?
//computeScroll(X, Y,false); //computeScroll(X, Y,false);
// DisplayCoord P = pixelsToNearestRowColumn(X, Y); // DisplayCoord P = pixelsToNearestRowColumn(X, Y);