projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7880102
)
Made the variable sheet automatically add variables when clickes in a blank
author
John Darrington
<john@darrington.wattle.id.au>
Sat, 29 Jul 2006 09:37:18 +0000
(09:37 +0000)
committer
John Darrington
<john@darrington.wattle.id.au>
Sat, 29 Jul 2006 09:37:18 +0000
(09:37 +0000)
row.
src/ui/gui/var-sheet.c
patch
|
blob
|
history
diff --git
a/src/ui/gui/var-sheet.c
b/src/ui/gui/var-sheet.c
index 4358c78326e835e1d794c48808583241c2660f10..3145f13dc7159cc7d754dddbd91fcc9f8b240e97 100644
(file)
--- a/
src/ui/gui/var-sheet.c
+++ b/
src/ui/gui/var-sheet.c
@@
-192,13
+192,15
@@
traverse_cell_callback (GtkSheet * sheet,
}
/* If the destination cell is outside the current variables, then
}
/* If the destination cell is outside the current variables, then
- a
ccept the destination only as the name column of the first blank row
+ a
utomatically create variables for the new rows.
*/
*/
- if ( *new_row > n_vars)
- return FALSE;
-
- if ( *new_row >= n_vars && *new_column != COL_NAME)
- return FALSE;
+ if ( (*new_row > n_vars) ||
+ (*new_row == n_vars && *new_column != COL_NAME) )
+ {
+ gint i;
+ for ( i = n_vars ; i <= *new_row; ++i )
+ psppire_dict_insert_variable(var_store->dict, i, NULL);
+ }
return TRUE;
}
return TRUE;
}