diff options
Diffstat (limited to 'src/forms')
-rw-r--r-- | src/forms/bookmarksdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/forms/bookmarksdialog.cpp b/src/forms/bookmarksdialog.cpp index d61cf18..c8a0425 100644 --- a/src/forms/bookmarksdialog.cpp +++ b/src/forms/bookmarksdialog.cpp @@ -60,7 +60,9 @@ BookmarksDialog::BookmarksDialog(MainWindow *parent) : BookmarksDialog::~BookmarksDialog() { - xbel->write("bookmarks.xbel"); + if(ui->treeWidget->topLevelItemCount() > 0) { + xbel->write("bookmarks.xbel"); + } delete xbel; delete ui; @@ -75,7 +77,7 @@ void BookmarksDialog::openItem(QTreeWidgetItem *item, int column) { Q_UNUSED(column) - parentWindow->createNewTab(QUrl::fromUserInput(item->text(1))); + parentWindow->addNewTab(QUrl::fromUserInput(item->text(1))); } void BookmarksDialog::showItemDetails() |