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>2015-12-18 08:02:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-18 08:02:31 +0300
commit4644f08685aac74e9173c704e74f4d6f8cbbf5e3 (patch)
tree6b6be2dc0ec17b44a132969ad0e0207b44a99d48 /source/blender/editors/space_console
parentdf6264f528ea589fc2d09d70a0e65e47f3cb2ae7 (diff)
Fix T46998: Console zoom doesn't update scrollbars
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_intern.h2
-rw-r--r--source/blender/editors/space_console/console_ops.c2
-rw-r--r--source/blender/editors/space_console/space_console.c18
3 files changed, 18 insertions, 4 deletions
diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h
index d8a4a6fd2bb..5b016b77e9f 100644
--- a/source/blender/editors/space_console/console_intern.h
+++ b/source/blender/editors/space_console/console_intern.h
@@ -49,6 +49,8 @@ ConsoleLine *console_scrollback_add_str(struct SpaceConsole *sc, char *str, bool
ConsoleLine *console_history_verify(const struct bContext *C);
+void console_textview_update_rect(SpaceConsole *sc, ARegion *ar);
+
void CONSOLE_OT_move(struct wmOperatorType *ot);
void CONSOLE_OT_delete(struct wmOperatorType *ot);
void CONSOLE_OT_insert(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 92731c2f135..2b99c4dfa3d 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -63,7 +63,7 @@ static void console_scroll_bottom(ARegion *ar)
v2d->cur.ymax = (float)v2d->winy;
}
-static void console_textview_update_rect(SpaceConsole *sc, ARegion *ar)
+void console_textview_update_rect(SpaceConsole *sc, ARegion *ar)
{
View2D *v2d = &ar->v2d;
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index cf235d0fc02..182f2bd2e80 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -372,17 +372,29 @@ static void console_header_region_draw(const bContext *C, ARegion *ar)
ED_region_header(C, ar);
}
-static void console_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn)
+static void console_main_region_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *ar, wmNotifier *wmn)
{
// SpaceInfo *sinfo = sa->spacedata.first;
/* context changes */
switch (wmn->category) {
case NC_SPACE:
- if (wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */
- ED_region_tag_redraw(ar);
+ {
+ if (wmn->data == ND_SPACE_CONSOLE) {
+ if (wmn->action == NA_EDITED) {
+ if ((wmn->reference && sa) && (wmn->reference == sa->spacedata.first)) {
+ /* we've modified the geometry (font size), re-calculate rect */
+ console_textview_update_rect(wmn->reference, ar);
+ ED_region_tag_redraw(ar);
+ }
+ }
+ else {
+ /* generic redraw request */
+ ED_region_tag_redraw(ar);
+ }
}
break;
+ }
}
}