Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 218a457

Browse files
committed
bug fix
1 parent dfd9a85 commit 218a457

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ImageWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,7 @@ void ImageWindow::toggleMonitorClipboard() {
18661866

18671867
void ImageWindow::feedClipboardQueue(const QString &text) {
18681868
auto lines = text.split("\n", Qt::SkipEmptyParts);
1869-
if (lines.last() != lastClipboardText) {
1869+
if (lines.last().trimmed() != lastClipboardText) {
18701870
for (auto const & line : lines) {
18711871
if (line.trimmed().size() > 0)
18721872
clipboardTextQueue.append(line.trimmed());
@@ -1971,9 +1971,9 @@ bool ImageWindow::processClipboardQueue() {
19711971
bool result = false;
19721972
while (!clipboardTextQueue.isEmpty()) {
19731973
auto url = QUrl(clipboardTextQueue.front());
1974+
clipboardTextQueue.pop_front();
19741975
auto thisResult = pasteFromURL(url);
19751976
result = thisResult or result;
1976-
clipboardTextQueue.pop_front();
19771977
}
19781978
inQueue = false;
19791979
return result;

0 commit comments

Comments
 (0)