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>2011-10-02 01:09:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-02 01:09:42 +0400
commit91283853b27fd793b3bcaff58af0991288bba437 (patch)
treea173e82889aa3390f5ec91300467580f0cb710d9
parent077fd134167d7ee73fb026b5b7dea21d31c0b28c (diff)
fix [#28786] Large enum lists display columns in inverted order (right to left)
also cleared annoying intel c++ warnings.
-rw-r--r--CMakeLists.txt4
-rw-r--r--source/blender/editors/interface/interface_regions.c9
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h2
4 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69d6bd5ae90..d1070baad9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1293,6 +1293,10 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
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
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index c898ba983c7..d29e5975afb 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2308,7 +2308,6 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
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 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
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 */
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 3f8a310285e..ddd0fcc1007 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -314,7 +314,7 @@ static int rna_IDPArray_length(PointerRNA *ptr)
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;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index aab74056ad9..4cd4a2f11f9 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -383,7 +383,7 @@ struct MTex *rna_mtex_texture_slots_create(struct ID *self, struct bContext *C,
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 */