mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-08 11:43:43 +02:00
Corrected dereferencing of cell dependencies, which was being applied
only at the time of running the command "load". But cells are generally loaded only on an as-needed basis, so the dereferencing option must be saved as a flag in the cell and honored whenever its subcells are expanded or otherwise read at a later time.
This commit is contained in:
+13
-3
@@ -424,7 +424,10 @@ extTreeSrPaintArea(scx, func, cdarg)
|
||||
int pNum;
|
||||
|
||||
if ((def->cd_flags & CDAVAILABLE) == 0)
|
||||
if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return 0;
|
||||
{
|
||||
bool dereference = (def->cd_flags & CDDEREFERENCE) ? TRUE : FALSE;
|
||||
if (!DBCellRead(def, (char *) NULL, TRUE, dereference, NULL)) return 0;
|
||||
}
|
||||
|
||||
filter.tf_func = func;
|
||||
filter.tf_arg = cdarg;
|
||||
@@ -461,7 +464,10 @@ extTreeSrFunc(scx, fp)
|
||||
int pNum;
|
||||
|
||||
if ((def->cd_flags & CDAVAILABLE) == 0)
|
||||
if (!DBCellRead(def, (char *) NULL, TRUE, FALSE, NULL)) return (0);
|
||||
{
|
||||
bool dereference = (def->cd_flags & CDDEREFERENCE) ? TRUE : FALSE;
|
||||
if (!DBCellRead(def, (char *) NULL, TRUE, dereference, NULL)) return (0);
|
||||
}
|
||||
|
||||
context.tc_scx = scx;
|
||||
context.tc_filter = fp;
|
||||
@@ -548,8 +554,12 @@ extCellSrArea(scx, func, cdarg)
|
||||
filter.tf_arg = cdarg;
|
||||
|
||||
if ((scx->scx_use->cu_def->cd_flags & CDAVAILABLE) == 0)
|
||||
if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, FALSE, NULL))
|
||||
{
|
||||
bool dereference = (scx->scx_use->cu_def->cd_flags & CDDEREFERENCE) ?
|
||||
TRUE : FALSE;
|
||||
if (!DBCellRead(scx->scx_use->cu_def, (char *) NULL, TRUE, dereference, NULL))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* In order to make this work with zero-size areas, we first expand
|
||||
|
||||
Reference in New Issue
Block a user