Fixed double click selection.

This commit is contained in:
Cranken
2018-10-06 13:43:21 +02:00
committed by pajlada
parent 335b889efe
commit 4c4d1d2042
4 changed files with 131 additions and 12 deletions
+10
View File
@@ -76,4 +76,14 @@ struct Selection {
}
};
struct DoubleClickSelection {
int originalStart = 0;
int originalEnd = 0;
int origMessageIndex;
bool selectingLeft = false;
bool selectingRight = false;
SelectionItem origStartItem;
SelectionItem origEndItem;
};
} // namespace chatterino
@@ -485,7 +485,7 @@ int MessageLayoutContainer::getSelectionIndex(QPoint point)
}
// this is the word
if (point.x() < this->elements_[i]->getRect().right()) {
if (point.x() <= this->elements_[i]->getRect().right()) {
index += this->elements_[i]->getMouseOverIndex(point);
break;
}