aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-24 05:44:32 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-24 05:44:32 +0800
commit2829dd55fd46782faf9ee12e4a6fbb293ffd3f7e (patch)
tree511336392f123191a823f88461ed98a32a369b35 /widgets
parent320e99019744888db9c5a66063314e316b444de4 (diff)
downloadgsoc2013-evolution-2829dd55fd46782faf9ee12e4a6fbb293ffd3f7e.tar.gz
gsoc2013-evolution-2829dd55fd46782faf9ee12e4a6fbb293ffd3f7e.tar.zst
gsoc2013-evolution-2829dd55fd46782faf9ee12e4a6fbb293ffd3f7e.zip
Made this only up the insert_count if it actually had to do any non
2001-03-23 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (reposition_path): Made this only up the insert_count if it actually had to do any non constant work to reposition the path. svn path=/trunk/; revision=8918
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-tree-sorted.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 168dc6aec7..b5fc211347 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -302,7 +302,6 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
ETreeSortedPath *parent = path->parent;
if (parent) {
if (ets->priv->sort_idle_id == 0) {
- ets->priv->insert_count++;
if (ets->priv->insert_count > ETS_INSERT_MAX) {
/* schedule a sort, and append instead */
schedule_resort(ets, parent, TRUE, FALSE);
@@ -322,20 +321,22 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path)
if (new_index > old_index) {
int i;
- e_tree_model_pre_change(E_TREE_MODEL(ets));
+ ets->priv->insert_count++;
memmove(parent->children + old_index, parent->children + old_index + 1, sizeof (ETreePath) * (new_index - old_index));
parent->children[new_index] = path;
for (i = old_index; i <= new_index; i++)
parent->children[i]->position = i;
e_tree_model_node_changed(E_TREE_MODEL(ets), parent);
+ e_tree_model_pre_change(E_TREE_MODEL(ets));
} else if (new_index < old_index) {
int i;
- e_tree_model_pre_change(E_TREE_MODEL(ets));
+ ets->priv->insert_count++;
memmove(parent->children + new_index + 1, parent->children + new_index, sizeof (ETreePath) * (old_index - new_index));
parent->children[new_index] = path;
for (i = new_index; i <= old_index; i++)
parent->children[i]->position = i;
e_tree_model_node_changed(E_TREE_MODEL(ets), parent);
+ e_tree_model_pre_change(E_TREE_MODEL(ets));
}
}
} else
bsd-ports-gnome/commit/textproc/p5-XML-XPath?h=dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8&id=b3ddd47cdba59814a098fa9d7bbb04d9701de9b1'>- Update to 1.32jadawin2016-02-242-3/+3 * - Update to 1.31jadawin2016-02-232-3/+3 * Update to 1.30. Move p5-Path-Tiny to TEST_DEPENDS as it is only usedadamw2016-02-072-5/+5 * Update to 1.28.adamw2016-02-032-3/+3 * - Update to 1.27sunpoet2016-02-022-4/+5 * - Update to 1.25jadawin2016-01-212-3/+3 * - Update to 1.24sunpoet2016-01-202-3/+3 * - Update to 1.23sunpoet2016-01-192-3/+3 * Update to 1.22.adamw2016-01-162-3/+3 * - Update to 1.20sunpoet2016-01-132-3/+3 * - Update to 1.16sunpoet2015-12-293-20/+23 * Change the way Perl modules are installed, update the default Perl to 5.18.mat2014-11-262-6/+1 * Support STAGEDIR.vanilla2013-11-072-27/+33 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-21