mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-03-28 02:49:24 +00:00
restructured so clipboard actions happen after copy
This commit is contained in:
committed by
borgmanJeremy
parent
1779a88bb5
commit
7cbc1f076f
@@ -135,17 +135,26 @@ bool ScreenshotSaver::saveToFilesystemGUI(const QPixmap& capture)
|
||||
if (ok) {
|
||||
QString pathNoFile =
|
||||
savePath.left(savePath.lastIndexOf(QLatin1String("/")));
|
||||
|
||||
ConfigHandler().setSavePath(pathNoFile);
|
||||
|
||||
QString msg = QObject::tr("Capture saved as ") + savePath;
|
||||
|
||||
if (config.copyPathAfterSaveEnabled()) {
|
||||
QApplication::clipboard()->setText(savePath);
|
||||
msg =
|
||||
QObject::tr("Capture is saved and copied to the clipboard as ") +
|
||||
savePath;
|
||||
}
|
||||
|
||||
SystemNotification().sendMessage(msg, savePath);
|
||||
|
||||
Controller::getInstance()->sendCaptureSaved(
|
||||
m_id, QFileInfo(savePath).canonicalFilePath());
|
||||
|
||||
if (config.copyPathAfterSaveEnabled()) {
|
||||
QApplication::clipboard()->setText(savePath);
|
||||
}
|
||||
|
||||
} else {
|
||||
QString msg = QObject::tr("Error trying to save as ") + savePath;
|
||||
QMessageBox saveErrBox(
|
||||
|
||||
Reference in New Issue
Block a user