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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
commit5fa7d1c1b4e7bde1d173caa60af0e273c86b6f0b (patch)
tree186a794aef722993c7067a657b4d007c62dd669b /source/blender/editors/space_text
parentc34f831757e0985b7523b6e5bbfadd7dd6a2c161 (diff)
2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 5638cb6daf5..7a3f0ff80e5 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2359,6 +2359,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
static int find_and_replace(bContext *C, wmOperator *op, short mode)
{
+ Main *bmain= CTX_data_main(C);
SpaceText *st= CTX_wm_space_text(C);
Text *start= NULL, *text= st->text;
int flags, first= 1;
@@ -2420,7 +2421,7 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode)
if(text->id.next)
text= st->text= text->id.next;
else
- text= st->text= G.main->text.first;
+ text= st->text= bmain->text.first;
txt_move_toline(text, 0, 0);
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);