second problem resolved: adding bookmars is ignored if url is empty; refs #147
This commit is contained in:
@@ -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());
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user