From bcb4041e0e433e6ac0d65e87bd50c194459f5684 Mon Sep 17 00:00:00 2001 From: borgmanJeremy <46930769+borgmanJeremy@users.noreply.github.com> Date: Mon, 7 Feb 2022 08:19:43 -0600 Subject: [PATCH] allow numpad numers to resize and fix text artifacting on large resize (#2386) --- src/widgets/capture/capturewidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 8baea3ef..642445ae 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -821,7 +821,8 @@ void CaptureWidget::keyPressEvent(QKeyEvent* e) // If the key is a digit, change the tool size bool ok; int digit = e->text().toInt(&ok); - if (ok && e->modifiers() == Qt::NoModifier) { // digit received + if (ok && ((e->modifiers() == Qt::NoModifier) || + e->modifiers() == Qt::KeypadModifier)) { // digit received m_toolSizeByKeyboard = 10 * m_toolSizeByKeyboard + digit; setToolSize(m_toolSizeByKeyboard); if (m_context.toolSize != m_toolSizeByKeyboard) { @@ -1242,6 +1243,8 @@ void CaptureWidget::onToolSizeChanged(int t) drawToolsData(); updateTool(toolItem); } + // Force a repaint to prevent artifacting + this->repaint(); } void CaptureWidget::onToolSizeSettled(int size)