mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 10:11:20 +00:00
Fixed double click behavior.
This commit is contained in:
parent
8313b2a2fd
commit
f0aa9c423b
@ -866,10 +866,10 @@ void KTerminalDisplay::mouseDoubleClickEvent(QPoint position, int but, int mod)
|
|||||||
Qt::KeyboardModifier modifiers = (Qt::KeyboardModifier) mod;
|
Qt::KeyboardModifier modifiers = (Qt::KeyboardModifier) mod;
|
||||||
|
|
||||||
// Yes, successive middle click can trigger this event
|
// Yes, successive middle click can trigger this event
|
||||||
if (button == Qt::MidButton) {
|
// if (button == Qt::MidButton) {
|
||||||
processMidButtonClick(position, modifiers);
|
// processMidButtonClick(position, modifiers);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (button != Qt::LeftButton) return;
|
if (button != Qt::LeftButton) return;
|
||||||
if (!_screenWindow) return;
|
if (!_screenWindow) return;
|
||||||
@ -881,11 +881,7 @@ void KTerminalDisplay::mouseDoubleClickEvent(QPoint position, int but, int mod)
|
|||||||
|
|
||||||
// pass on double click as two clicks.
|
// pass on double click as two clicks.
|
||||||
if (!_mouseMarks && !(modifiers & Qt::ShiftModifier)) {
|
if (!_mouseMarks && !(modifiers & Qt::ShiftModifier)) {
|
||||||
// Send just _ONE_ click event, since the first click of the double click
|
// There is no need to pass other events.
|
||||||
// was already sent by the click handler
|
|
||||||
emit mouseSignal(0, charColumn + 1,
|
|
||||||
charLine + 1,
|
|
||||||
0);
|
|
||||||
/*emit mouseSignal(0, charColumn + 1,
|
/*emit mouseSignal(0, charColumn + 1,
|
||||||
charLine + 1 + _scrollBar->value() - _scrollBar->maximum(),
|
charLine + 1 + _scrollBar->value() - _scrollBar->maximum(),
|
||||||
0); */ // left button
|
0); */ // left button
|
||||||
@ -906,6 +902,7 @@ void KTerminalDisplay::mouseDoubleClickEvent(QPoint position, int but, int mod)
|
|||||||
_screenWindow->setSelectionEnd(endSel.x() , endSel.y());
|
_screenWindow->setSelectionEnd(endSel.x() , endSel.y());
|
||||||
copyToX11Selection();
|
copyToX11Selection();
|
||||||
|
|
||||||
|
//TODO implement triple click.
|
||||||
// _possibleTripleClick = true;
|
// _possibleTripleClick = true;
|
||||||
|
|
||||||
// QTimer::singleShot(QApplication::doubleClickInterval(), this,
|
// QTimer::singleShot(QApplication::doubleClickInterval(), this,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user