Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 2362 | if (cursorOnLine == m_lastClickedLine && cursorOnLine >= 0 && cursorOnLine <= m_doc->lastLine()) { | |||
---|---|---|---|---|---|
2387 | if (area == FoldingMarkers) { | 2387 | if (area == FoldingMarkers) { | ||
2388 | // Prefer the highlighted range over the exact clicked line | 2388 | // Prefer the highlighted range over the exact clicked line | ||
2389 | const int lineToToggle = m_foldingRange ? m_foldingRange->toRange().start().line() : cursorOnLine; | 2389 | const int lineToToggle = m_foldingRange ? m_foldingRange->toRange().start().line() : cursorOnLine; | ||
2390 | if (e->button() == Qt::LeftButton) { | 2390 | if (e->button() == Qt::LeftButton) { | ||
2391 | m_view->toggleFoldingOfLine(lineToToggle); | 2391 | m_view->toggleFoldingOfLine(lineToToggle); | ||
2392 | } else if (e->button() == Qt::RightButton) { | 2392 | } else if (e->button() == Qt::RightButton) { | ||
2393 | m_view->toggleFoldingsInRange(lineToToggle); | 2393 | m_view->toggleFoldingsInRange(lineToToggle); | ||
2394 | } | 2394 | } | ||
2395 | | ||||
2396 | delete m_foldingPreview; | | |||
2397 | } | 2395 | } | ||
2398 | 2396 | | |||
2399 | if (area == AnnotationBorder) { | 2397 | if (area == AnnotationBorder) { | ||
2400 | const bool singleClick = style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, nullptr, this); | 2398 | const bool singleClick = style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, nullptr, this); | ||
2401 | if (e->button() == Qt::LeftButton && singleClick) { | 2399 | if (e->button() == Qt::LeftButton && singleClick) { | ||
2402 | emit m_view->annotationActivated(m_view, cursorOnLine); | 2400 | emit m_view->annotationActivated(m_view, cursorOnLine); | ||
2403 | } else if (e->button() == Qt::RightButton) { | 2401 | } else if (e->button() == Qt::RightButton) { | ||
2404 | showAnnotationMenu(cursorOnLine, e->globalPos()); | 2402 | showAnnotationMenu(cursorOnLine, e->globalPos()); | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |