Fix T49804: Display grid Scale/Subdivision are sometimes disabled in View3D when they should not.

Not really possible to precisely detect all cases in which they should or
should not be active, but at least now it won't show as disabled when it
actually has some effects.
This commit is contained in:
Bastien Montagne 2016-10-21 16:06:53 +02:00
parent f7ce482385
commit b51874437d
Notes: blender-bot 2023-02-14 08:06:38 +01:00
Referenced by issue #49804, Display Scale is disabled
1 changed files with 4 additions and 2 deletions

View File

@ -3231,8 +3231,10 @@ class VIEW3D_PT_view3d_display(Panel):
row.prop(view, "show_axis_z", text="Z", toggle=True)
sub = col.column(align=True)
sub.active = (display_all and view.show_floor)
sub.prop(view, "grid_lines", text="Lines")
sub.active = bool(view.show_floor or view.region_quadviews or not view.region_3d.is_perspective)
subsub = sub.column(align=True)
subsub.active = view.show_floor
subsub.prop(view, "grid_lines", text="Lines")
sub.prop(view, "grid_scale", text="Scale")
subsub = sub.column(align=True)
subsub.active = scene.unit_settings.system == 'NONE'