]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Qt窗内进行选中时暂停
authorqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 16:18:35 +0000 (00:18 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 4 Oct 2020 16:18:35 +0000 (00:18 +0800)
Reply/qt.go

index 2c79d5701997148accfe309043bd60b90b764bd8..f61065943835480d1d0f2a48d98a5aa9f53c1df5 100644 (file)
@@ -117,6 +117,7 @@ func new(pare *widgets.QWidget, layouts *widgets.QGridLayout) (t *widgets.QTextE
 
 func text(s string, pare *widgets.QTextEdit) {
        c := pare.TextCursor()
+       if c.HasSelection() {return}//用户选择,暂停
        c.MovePosition(gui.QTextCursor__End, gui.QTextCursor__MoveAnchor, 1)
        c.InsertBlock()
        c.BeginEditBlock()