Stop special treatment of some buttons

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-10-06 14:53:50 +02:00
parent 85352ff72f
commit 60d2d8c33d
10 changed files with 23 additions and 85 deletions

View File

@@ -3,6 +3,7 @@
#include "savetool.h"
#include "src/utils/screenshotsaver.h"
#include <QApplication> // TODO rm
#include <QPainter>
#if defined(Q_OS_MACOS)
#include "src/widgets/capture/capturewidget.h"
@@ -57,9 +58,9 @@ void SaveTool::pressed(const CaptureContext& context)
}
}
#endif
emit requestAction(REQ_CLEAR_SELECTION);
if (context.savePath.isEmpty()) {
emit requestAction(REQ_HIDE_GUI);
qApp->processEvents();
bool ok = ScreenshotSaver().saveToFilesystemGUI(
context.selectedScreenshotArea());
if (ok) {
@@ -72,4 +73,5 @@ void SaveTool::pressed(const CaptureContext& context)
emit requestAction(REQ_CAPTURE_DONE_OK);
}
}
emit requestAction(REQ_CLOSE_GUI);
}