[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40738] trunk/blender: fix [#28786] Large enum lists display columns in inverted order (right to left)

Campbell Barton ideasman42 at gmail.com
Mon Oct 3 19:56:04 CEST 2011


Yep it was but thinking about this more, I see you're point...

Issue is theres a conflict - ZanQdo's bug reports that the items are
shown in the reverse order to the one he defined in the Enum.

Agree that its nice quick access for the first few items in the list
to always be close to where the user clicks.

Hrmf! better revert this commit and users can put up with reverse
order being a bit odd in some cases.

On Tue, Oct 4, 2011 at 4:35 AM, Brecht Van Lommel
<brechtvanlommel at pandora.be> wrote:
> Hi,
>
> This seems to also flip the order of enum menus in the headers align
> to the bottom. Was that intentional? I wouldn't say the new order is
> wrong, but it breaks muscle memory a bit.
>
> Brecht.
>
> On Sat, Oct 1, 2011 at 11:09 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>> Revision: 40738
>>          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40738
>> Author:   campbellbarton
>> Date:     2011-10-01 21:09:42 +0000 (Sat, 01 Oct 2011)
>> Log Message:
>> -----------
>> fix [#28786] Large enum lists display columns in inverted order (right to left)
>>
>> also cleared annoying intel c++ warnings.
>>
>> Modified Paths:
>> --------------
>>    trunk/blender/CMakeLists.txt
>>    trunk/blender/source/blender/editors/interface/interface_regions.c
>>    trunk/blender/source/blender/makesrna/intern/rna_ID.c
>>    trunk/blender/source/blender/makesrna/intern/rna_internal.h
>>
>> Modified: trunk/blender/CMakeLists.txt
>> ===================================================================
>> --- trunk/blender/CMakeLists.txt        2011-10-01 19:52:33 UTC (rev 40737)
>> +++ trunk/blender/CMakeLists.txt        2011-10-01 21:09:42 UTC (rev 40738)
>> @@ -1293,6 +1293,10 @@
>>        ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
>>        ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
>>
>> +       # disable numbered, false positives
>> +       set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556")
>> +       set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556")
>> +
>>  endif()
>>
>>  # MSVC2010 fails to links C++ libs right
>>
>> Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
>> ===================================================================
>> --- trunk/blender/source/blender/editors/interface/interface_regions.c  2011-10-01 19:52:33 UTC (rev 40737)
>> +++ trunk/blender/source/blender/editors/interface/interface_regions.c  2011-10-01 21:09:42 UTC (rev 40738)
>> @@ -2308,7 +2308,6 @@
>>        uiStyle *style= UI_GetStyle();
>>        uiPopupBlockHandle *handle;
>>        uiPopupMenu *pup;
>> -
>>        pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy");
>>        pup->block= uiBeginBlock(C, NULL, "ui_button_menu_create", UI_EMBOSSP);
>>        pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
>> @@ -2323,6 +2322,14 @@
>>                pup->popup= 1;
>>                pup->block->flag |= UI_BLOCK_NO_FLIP;
>>        }
>> +       else {
>> +               /* if this is an rna button then we can assume its an enum
>> +                * flipping enums is generally not good since the order can be
>> +                * important [#28786] */
>> +               if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
>> +                       pup->block->flag |= UI_BLOCK_NO_FLIP;
>> +               }
>> +       }
>>
>>        if(str) {
>>                /* menu is created from a string */
>>
>> Modified: trunk/blender/source/blender/makesrna/intern/rna_ID.c
>> ===================================================================
>> --- trunk/blender/source/blender/makesrna/intern/rna_ID.c       2011-10-01 19:52:33 UTC (rev 40737)
>> +++ trunk/blender/source/blender/makesrna/intern/rna_ID.c       2011-10-01 21:09:42 UTC (rev 40738)
>> @@ -314,7 +314,7 @@
>>        return prop->len;
>>  }
>>
>> -int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, PointerRNA *assign_ptr)
>> +int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assign_ptr)
>>  {
>>        ID *id=           ptr->id.data;
>>        Material *mat_id= assign_ptr->id.data;
>>
>> Modified: trunk/blender/source/blender/makesrna/intern/rna_internal.h
>> ===================================================================
>> --- trunk/blender/source/blender/makesrna/intern/rna_internal.h 2011-10-01 19:52:33 UTC (rev 40737)
>> +++ trunk/blender/source/blender/makesrna/intern/rna_internal.h 2011-10-01 21:09:42 UTC (rev 40738)
>> @@ -383,7 +383,7 @@
>>  void rna_mtex_texture_slots_clear(struct ID *self, struct bContext *C, struct ReportList *reports, int index);
>>
>>
>> -int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, struct PointerRNA *assign_ptr);
>> +int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr);
>>
>>  #endif /* RNA_INTERNAL_H */
>>
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell


More information about the Bf-committers mailing list