mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-07 01:23:58 +00:00
Fix #311
Flameshot was unable to start new captures after saving with
Ctrl+s while having a text area active from the Text tool.
This was caused by the overloaded call to close() which
was deleting the text area instead of closing the capture
and the consequent call of the destructor. That caused an
always active capture session.
This commit is contained in:
@@ -186,12 +186,12 @@ QPixmap CaptureWidget::pixmap() {
|
||||
return m_context.selectedScreenshotArea();
|
||||
}
|
||||
|
||||
void CaptureWidget::close() {
|
||||
void CaptureWidget::deleteToolwidgetOrClose() {
|
||||
if (m_toolWidget) {
|
||||
m_toolWidget->deleteLater();
|
||||
m_toolWidget = nullptr;
|
||||
} else {
|
||||
QWidget::close();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ void CaptureWidget::initShortcuts() {
|
||||
new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_Up), this, SLOT(upResize()));
|
||||
new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_Down), this, SLOT(downResize()));
|
||||
new QShortcut(Qt::Key_Space, this, SLOT(togglePanel()));
|
||||
new QShortcut(Qt::Key_Escape, this, SLOT(close()));
|
||||
new QShortcut(Qt::Key_Escape, this, SLOT(deleteToolwidgetOrClose()));
|
||||
new QShortcut(Qt::Key_Return, this, SLOT(copyScreenshot()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user