From be64cff0140286829ae60ca90b640d5b16c4ebcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 10 May 2012 09:14:04 +0000 Subject: [PATCH] second problem resolved: adding bookmars is ignored if url is empty; refs #147 --- src/browser.hxx | 2 +- src/editbookmarks.hxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser.hxx b/src/browser.hxx index c6f388a..69a76f0 100644 --- a/src/browser.hxx +++ b/src/browser.hxx @@ -597,7 +597,7 @@ class Browser: public QMainWindow, protected Ui::Browser { void on_actionAddBookmark_triggered() { QComboBox* url(qobject_cast(_url)); if (!_bookmarks) return; - if (_url) { + if (_url && !url->currentText().isEmpty()) { url->addItem(url->currentText()); QAction* a(_bookmarks->addAction(url->currentText())); a->setData(url->currentText()); diff --git a/src/editbookmarks.hxx b/src/editbookmarks.hxx index e9bde02..011ba00 100644 --- a/src/editbookmarks.hxx +++ b/src/editbookmarks.hxx @@ -50,6 +50,7 @@ class EditBookmarks: public QDialog, protected Ui::EditBookmarks { } } void on__add_clicked(bool) { + if (_url->currentText().isEmpty()) return; _bookmarks->addItem(_url->currentText()); } protected: