author | allenforsythe <allenforsythe> | 2003-05-16 10:01:09 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-16 10:01:09 (UTC) |
commit | c6de8acfd02b24dead5a1ff815c3f167a578a48b (patch) (unidiff) | |
tree | 6d5749b781a70741eb51e84d36974e30c3ffc1a6 | |
parent | 822414b8ac44ddc8c79aaffa630b45a13015d51a (diff) | |
download | opie-c6de8acfd02b24dead5a1ff815c3f167a578a48b.zip opie-c6de8acfd02b24dead5a1ff815c3f167a578a48b.tar.gz opie-c6de8acfd02b24dead5a1ff815c3f167a578a48b.tar.bz2 |
Fixed edit transfer and edit account/view account bugs
-rwxr-xr-x | noncore/apps/qashmoney/accountdisplay.cpp | 12 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/qmaccounts.db | bin | 4096 -> 4096 bytes | |||
-rwxr-xr-x | noncore/apps/qashmoney/qmmemory.db | bin | 4096 -> 4096 bytes | |||
-rwxr-xr-x | noncore/apps/qashmoney/qmtransactions.db | bin | 4096 -> 4096 bytes | |||
-rwxr-xr-x | noncore/apps/qashmoney/qmtransfers.db | bin | 3072 -> 3072 bytes | |||
-rwxr-xr-x | noncore/apps/qashmoney/transactiondisplay.cpp | 2 |
6 files changed, 13 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/accountdisplay.cpp b/noncore/apps/qashmoney/accountdisplay.cpp index 46ab1db..b2c0838 100755 --- a/noncore/apps/qashmoney/accountdisplay.cpp +++ b/noncore/apps/qashmoney/accountdisplay.cpp | |||
@@ -404,24 +404,36 @@ void AccountDisplay::editAccount () | |||
404 | } | 404 | } |
405 | } | 405 | } |
406 | } | 406 | } |
407 | else | 407 | else |
408 | currencybox->setEnabled ( FALSE ); | 408 | currencybox->setEnabled ( FALSE ); |
409 | 409 | ||
410 | //execute the dialog box | 410 | //execute the dialog box |
411 | int response = editaccountwindow->exec(); | 411 | int response = editaccountwindow->exec(); |
412 | if ( response == 1 ) | 412 | if ( response == 1 ) |
413 | { | 413 | { |
414 | account->updateAccount ( accountname->text(), accountdescription->text(), currencybox->currencybox->currentText(), accountid ); | 414 | account->updateAccount ( accountname->text(), accountdescription->text(), currencybox->currencybox->currentText(), accountid ); |
415 | account->displayAccounts ( listview ); | 415 | account->displayAccounts ( listview ); |
416 | |||
417 | // Try and select the same account that was just edited | ||
418 | QListViewItemIterator it ( listview ); | ||
419 | for ( ; it.current(); ++it ) | ||
420 | { | ||
421 | if ( it.current()->text ( 0 ) == accountname->text() ) | ||
422 | { | ||
423 | listview->setSelected ( it.current(), TRUE ); | ||
424 | return; | ||
425 | } | ||
426 | } | ||
427 | maintabs->setTabEnabled ( tab2, FALSE ); | ||
416 | } | 428 | } |
417 | } | 429 | } |
418 | } | 430 | } |
419 | 431 | ||
420 | void AccountDisplay::setAccountExpanded ( QListViewItem *item ) | 432 | void AccountDisplay::setAccountExpanded ( QListViewItem *item ) |
421 | { | 433 | { |
422 | int accountid = item->text ( getIDColumn() ).toInt(); | 434 | int accountid = item->text ( getIDColumn() ).toInt(); |
423 | account->setAccountExpanded ( 1, accountid ); | 435 | account->setAccountExpanded ( 1, accountid ); |
424 | } | 436 | } |
425 | 437 | ||
426 | void AccountDisplay::setAccountCollapsed ( QListViewItem *item ) | 438 | void AccountDisplay::setAccountCollapsed ( QListViewItem *item ) |
427 | { | 439 | { |
diff --git a/noncore/apps/qashmoney/qmaccounts.db b/noncore/apps/qashmoney/qmaccounts.db index 1c6f024..449bcab 100755 --- a/noncore/apps/qashmoney/qmaccounts.db +++ b/noncore/apps/qashmoney/qmaccounts.db | |||
Binary files differ | |||
diff --git a/noncore/apps/qashmoney/qmmemory.db b/noncore/apps/qashmoney/qmmemory.db index be33cd4..5c23122 100755 --- a/noncore/apps/qashmoney/qmmemory.db +++ b/noncore/apps/qashmoney/qmmemory.db | |||
Binary files differ | |||
diff --git a/noncore/apps/qashmoney/qmtransactions.db b/noncore/apps/qashmoney/qmtransactions.db index 1b05561..9e4acc9 100755 --- a/noncore/apps/qashmoney/qmtransactions.db +++ b/noncore/apps/qashmoney/qmtransactions.db | |||
Binary files differ | |||
diff --git a/noncore/apps/qashmoney/qmtransfers.db b/noncore/apps/qashmoney/qmtransfers.db index 4c04b5f..c31df1a 100755 --- a/noncore/apps/qashmoney/qmtransfers.db +++ b/noncore/apps/qashmoney/qmtransfers.db | |||
Binary files differ | |||
diff --git a/noncore/apps/qashmoney/transactiondisplay.cpp b/noncore/apps/qashmoney/transactiondisplay.cpp index 6e5c4f6..14f5641 100755 --- a/noncore/apps/qashmoney/transactiondisplay.cpp +++ b/noncore/apps/qashmoney/transactiondisplay.cpp | |||
@@ -252,25 +252,25 @@ void TransactionDisplay::editTransfer () | |||
252 | 252 | ||
253 | //set cleared flag | 253 | //set cleared flag |
254 | int cleared = 0; | 254 | int cleared = 0; |
255 | if ( clearedcheckbox->isChecked() == TRUE ) | 255 | if ( clearedcheckbox->isChecked() == TRUE ) |
256 | cleared = 1; | 256 | cleared = 1; |
257 | 257 | ||
258 | //update transfer | 258 | //update transfer |
259 | transfer->updateTransfer ( fromaccount, account->getParentAccountID ( fromaccount ), toaccount, account->getParentAccountID ( toaccount ), | 259 | transfer->updateTransfer ( fromaccount, account->getParentAccountID ( fromaccount ), toaccount, account->getParentAccountID ( toaccount ), |
260 | day, month, year, amount->text().toFloat(), cleared, transferid ); | 260 | day, month, year, amount->text().toFloat(), cleared, transferid ); |
261 | 261 | ||
262 | account->updateAccountBalance ( fromaccount ); | 262 | account->updateAccountBalance ( fromaccount ); |
263 | if ( account->getParentAccountID ( fromaccount ) != -1 ) | 263 | if ( account->getParentAccountID ( fromaccount ) != -1 ) |
264 | account->changeParentAccountBalance ( fromaccount ); | 264 | account->changeParentAccountBalance ( account->getParentAccountID ( fromaccount ) ); |
265 | 265 | ||
266 | updateAndDisplay ( toaccount ); | 266 | updateAndDisplay ( toaccount ); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | 269 | ||
270 | void TransactionDisplay::editTransaction () | 270 | void TransactionDisplay::editTransaction () |
271 | { | 271 | { |
272 | int cleared; | 272 | int cleared; |
273 | 273 | ||
274 | // set the transaction id and budgetid | 274 | // set the transaction id and budgetid |
275 | int transactionid = listview->currentItem()->text ( getIDColumn() ).toInt(); | 275 | int transactionid = listview->currentItem()->text ( getIDColumn() ).toInt(); |
276 | int budgetid = transaction->getBudgetID ( transactionid ); | 276 | int budgetid = transaction->getBudgetID ( transactionid ); |