aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-02-14 16:08:47 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-02-14 16:08:47 +0100
commitafe44e984419f25fec0c3dfc5fc0f9800b205e2c (patch)
tree8f3bcdb029eca3367e9afbaa3455ab4ee61ca450 /src/forms
parentBookmark improvements (diff)
downloadsmolbote-afe44e984419f25fec0c3dfc5fc0f9800b205e2c.tar.xz
Settings changes
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/bookmarksdialog.cpp6
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()