diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2017-05-18 11:47:56 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2017-05-18 11:47:56 +0200 |
| commit | 19929a9bf3dcf209105962a4eec029f3b61cfb6e (patch) | |
| tree | a24358f04abe6d5b34c19557d17e04152a9f8a00 /System.c4g/DTSelectionContext.c | |
| parent | 02eeba571ddf5ed6d7892c1f6ba5e161f02454b8 (diff) | |
| download | ObjectsAppend-19929a9bf3dcf209105962a4eec029f3b61cfb6e.tar.gz ObjectsAppend-19929a9bf3dcf209105962a4eec029f3b61cfb6e.zip | |
Avoid strange behaviour if calling the ControlDigDouble override multiple times (caused sometimes of including CLNK)
Diffstat (limited to 'System.c4g/DTSelectionContext.c')
| -rw-r--r-- | System.c4g/DTSelectionContext.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/System.c4g/DTSelectionContext.c b/System.c4g/DTSelectionContext.c index 3584efa..1f4ebf0 100644 --- a/System.c4g/DTSelectionContext.c +++ b/System.c4g/DTSelectionContext.c @@ -379,9 +379,13 @@ func RemoveLineEntry(id id, int pos) return true; } -func ControlDigDouble(target, overloaded) +func ControlDigDouble() { - var ret = _inherited(target, true, ...); + static DT_SelectionContext_ControlDigDouble_overloaded; + var overloaded = DT_SelectionContext_ControlDigDouble_overloaded; + DT_SelectionContext_ControlDigDouble_overloaded = true; + var ret = _inherited(...); + DT_SelectionContext_ControlDigDouble_overloaded = overloaded; if(!ret && !overloaded) { if(GetProcedure() == "WALK" || GetProcedure() == "DIG" || GetProcedure() == "SWIM") |
