reposition the cursor for the context menu, but only if there is no selection
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(lammps-gui VERSION 1.5.8 LANGUAGES CXX)
|
project(lammps-gui VERSION 1.5.9 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|||||||
@ -668,7 +668,9 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
|||||||
|
|
||||||
void CodeEditor::contextMenuEvent(QContextMenuEvent *event)
|
void CodeEditor::contextMenuEvent(QContextMenuEvent *event)
|
||||||
{
|
{
|
||||||
// reposition the cursor here?
|
// reposition the cursor here, but only if there is no active selection
|
||||||
|
if (!textCursor().hasSelection()) setTextCursor(cursorForPosition(event->pos()));
|
||||||
|
|
||||||
QString page, help;
|
QString page, help;
|
||||||
find_help(page, help);
|
find_help(page, help);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user