Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-03-17 21:01:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-03-17 21:01:59 +0300
commitaee5cb776223ad007f2e1340907d9f2f4937f054 (patch)
tree5f72baa07941efb391243c1ca5c8d4c2f8d58352 /source/blender/python/api2_2x/Window.c
parentf96064d33c79cdc45a8d936fde3f66dd717f5242 (diff)
- [#8589] Scripts which use file selector not working correctly
Fix for another bug I introduced with persistent python windows. also removed unused var.
Diffstat (limited to 'source/blender/python/api2_2x/Window.c')
-rw-r--r--source/blender/python/api2_2x/Window.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c
index 22e19c9f54a..b4a14cc6ac8 100644
--- a/source/blender/python/api2_2x/Window.c
+++ b/source/blender/python/api2_2x/Window.c
@@ -535,10 +535,17 @@ static void getSelectedFile( char *name )
fprintf(stderr, "BPy error: Callback call failed!\n");
}
else Py_DECREF(result);
-
+
+
+
if (script->py_browsercallback == pycallback) {
- SCRIPT_SET_NULL(script);
+ if (script->flags & SCRIPT_GUI) {
+ script->py_browsercallback = NULL;
+ } else {
+ SCRIPT_SET_NULL(script);
+ }
}
+
/* else another call to selector was made inside pycallback */
Py_DECREF(pycallback);