aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addressbookpage.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-14 19:47:45 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-14 19:58:00 +0100
commit309f796b39d4ae7694c3f37a681c1ebcd1f58eda (patch)
tree2ad12f4d6bea1172f093067ade23fc11a56e13c5 /src/qt/addressbookpage.cpp
parent6ad44f569335d57a56e5b28582255439980f9b73 (diff)
[Qt] make most Windows appear centered on main GUI
- remove default value for parent variable in dialogs, which should appear centered over main GUI and pass appropriate value - add some addition NULL pointer checks
Diffstat (limited to 'src/qt/addressbookpage.cpp')
-rw-r--r--src/qt/addressbookpage.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index cc3afb2655..abda6c7981 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -158,6 +158,9 @@ void AddressBookPage::onCopyLabelAction()
void AddressBookPage::onEditAction()
{
+ if(!model)
+ return;
+
if(!ui->tableView->selectionModel())
return;
QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows();
@@ -165,9 +168,9 @@ void AddressBookPage::onEditAction()
return;
EditAddressDialog dlg(
- tab == SendingTab ?
- EditAddressDialog::EditSendingAddress :
- EditAddressDialog::EditReceivingAddress);
+ tab == SendingTab ?
+ EditAddressDialog::EditSendingAddress :
+ EditAddressDialog::EditReceivingAddress, this);
dlg.setModel(model);
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
dlg.loadRow(origIndex.row());
@@ -180,9 +183,9 @@ void AddressBookPage::on_newAddress_clicked()
return;
EditAddressDialog dlg(
- tab == SendingTab ?
- EditAddressDialog::NewSendingAddress :
- EditAddressDialog::NewReceivingAddress, this);
+ tab == SendingTab ?
+ EditAddressDialog::NewSendingAddress :
+ EditAddressDialog::NewReceivingAddress, this);
dlg.setModel(model);
if(dlg.exec())
{