second problem resolved: adding bookmars is ignored if url is empty; refs #147

This commit is contained in:
Marc Wäckerlin
2012-05-10 09:14:04 +00:00
parent fbc75df5d5
commit be64cff014
2 changed files with 2 additions and 1 deletions

View File

@@ -597,7 +597,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
void on_actionAddBookmark_triggered() {
QComboBox* url(qobject_cast<QComboBox*>(_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());

View File

@@ -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: