Clear clipboard when locking databases.

Closes #342
This commit is contained in:
Felix Geyer 2015-09-13 12:38:19 +02:00
parent 236edae60b
commit f236c32063
3 changed files with 15 additions and 10 deletions

View file

@ -27,6 +27,7 @@
#include "core/Metadata.h"
#include "core/qsavefile.h"
#include "format/CsvExporter.h"
#include "gui/Clipboard.h"
#include "gui/DatabaseWidget.h"
#include "gui/DatabaseWidgetStateSync.h"
#include "gui/DragTabBar.h"
@ -632,6 +633,8 @@ bool DatabaseTabWidget::hasLockableDatabases() const
void DatabaseTabWidget::lockDatabases()
{
clipboard()->clearCopiedText();
for (int i = 0; i < count(); i++) {
DatabaseWidget* dbWidget = static_cast<DatabaseWidget*>(widget(i));
Database* db = databaseFromDatabaseWidget(dbWidget);