clear clipboard before exiting

This commit is contained in:
Axel Kohlmeyer
2024-08-23 03:26:46 -04:00
parent a20997b7cd
commit 2beda14b23
2 changed files with 7 additions and 0 deletions

View File

@ -498,7 +498,9 @@ void ImageViewer::cmd_to_clipboard()
for (int i = modidx + 1; i < maxidx; ++i)
dumpcmd += blank + words[i];
dumpcmd += '\n';
#if QT_CONFIG(clipboard)
QGuiApplication::clipboard()->setText(dumpcmd);
#endif
}
void ImageViewer::change_group(int)

View File

@ -904,6 +904,9 @@ void LammpsGui::quit()
settings.setValue("mainy", height());
}
settings.sync();
#if QT_CONFIG(clipboard)
QGuiApplication::clipboard()->setText("");
#endif
QCoreApplication::quit();
}
@ -1457,8 +1460,10 @@ void LammpsGui::about()
}
to_clipboard += info.c_str();
#if QT_CONFIG(clipboard)
QGuiApplication::clipboard()->setText(to_clipboard);
info += "(Note: this text has been copied to the clipboard)\n";
#endif
QMessageBox msg;
msg.setWindowTitle("About LAMMPS-GUI");