forked from qt-creator/qt-creator
Make accidentally activating the link navigation more difficult
Only checking Ctrl and link availability on mouse release was triggering the navigation too easily. Now you have to press and release the mouse on the same link, having Ctrl pressed all the time. In addition, when changing the text selection the link is also cleared. Task-number: QTCREATORBUG-134 Reviewed-by: con
This commit is contained in:
@@ -538,6 +538,9 @@ protected:
|
||||
bool isValid() const
|
||||
{ return !(pos == -1 || length == -1); }
|
||||
|
||||
bool operator==(const Link &other) const
|
||||
{ return pos == other.pos && length == other.length; }
|
||||
|
||||
int pos; // Link position
|
||||
int length; // Link length
|
||||
|
||||
@@ -593,6 +596,7 @@ private:
|
||||
|
||||
QTextBlock collapsedBlockAt(const QPoint &pos, QRect *box = 0) const;
|
||||
|
||||
void updateLink(QMouseEvent *e);
|
||||
void showLink(const Link &);
|
||||
void clearLink();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user