mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Two fixes from Andreas Köhler. One fixes 331183, the problem where
editing a top-level account doesn't set the current parent. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13353 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
81bf512533
commit
c0dc99a3a6
@ -1,3 +1,9 @@
|
||||
2006-02-21 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-tree-model-account.c: Two fixes from Andreas
|
||||
Köhler. One fixes 331183, the problem where editing a top-level
|
||||
account doesn't set the current parent.
|
||||
|
||||
2006-02-21 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* lib/libqof/qof/qofevent.[ch] (QOF_DEFAULT_EVENT_LIMIT): rename, set
|
||||
@ -22,7 +28,7 @@
|
||||
|
||||
* src/register/register-gnome/gnucash-date-picker.c: Andreas
|
||||
Köhler's patch to prevent a crash in the register date picker
|
||||
widget when using gtk 2.8..
|
||||
widget when using gtk 2.8.
|
||||
|
||||
* src/bin/gnucash-bin.c:
|
||||
* src/gnome-utils/glade/commodity.glade:
|
||||
|
@ -1298,15 +1298,10 @@ gnc_tree_model_account_get_iter_from_account (GncTreeModelAccount *model,
|
||||
g_return_val_if_fail ((account != NULL), FALSE);
|
||||
g_return_val_if_fail ((iter != NULL), FALSE);
|
||||
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
if (priv->root != xaccAccountGetRoot (account)) {
|
||||
LEAVE("Root doesn't match");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
iter->user_data = account;
|
||||
iter->stamp = model->stamp;
|
||||
|
||||
priv = GNC_TREE_MODEL_ACCOUNT_GET_PRIVATE(model);
|
||||
if (account == priv->toplevel) {
|
||||
iter->user_data2 = NULL;
|
||||
iter->user_data3 = GINT_TO_POINTER (0);
|
||||
@ -1314,6 +1309,11 @@ gnc_tree_model_account_get_iter_from_account (GncTreeModelAccount *model,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (priv->root != xaccAccountGetRoot (account)) {
|
||||
LEAVE("Root doesn't match");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
group = xaccAccountGetParent (account);
|
||||
DEBUG("Looking through %d accounts at this level",
|
||||
xaccGroupGetNumAccounts (group));
|
||||
@ -1407,9 +1407,10 @@ gnc_tree_model_account_path_changed (GncTreeModelAccount *model,
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (gtk_tree_path_up (path)) {
|
||||
if (gtk_tree_model_get_iter (GTK_TREE_MODEL(model), &iter, path))
|
||||
if (gtk_tree_model_get_iter (GTK_TREE_MODEL(model), &iter, path)) {
|
||||
gtk_tree_model_row_changed (GTK_TREE_MODEL(model), path, &iter);
|
||||
gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL(model), path, &iter);
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user