[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58349] branches/soc-2013-paint/source/ blender/editors/interface/interface_handlers.c: Enable drag'n' drop of colours from any region to any other region.
Antony Riakiotakis
kalast at gmail.com
Wed Jul 17 19:53:37 CEST 2013
Revision: 58349
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58349
Author: psy-fi
Date: 2013-07-17 17:53:36 +0000 (Wed, 17 Jul 2013)
Log Message:
-----------
Enable drag'n'drop of colours from any region to any other region.
Modified Paths:
--------------
branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c
Modified: branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c 2013-07-17 17:36:07 UTC (rev 58348)
+++ branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c 2013-07-17 17:53:36 UTC (rev 58349)
@@ -806,11 +806,19 @@
{
if (event->val != KM_PRESS) {
wmWindow *win = CTX_wm_window(C);
- ARegion *ar = CTX_wm_region(C);
+ ARegion *ar;
+ ScrArea *sa;
+ uiBut *but = NULL;
+ bool found = false;
/* find button under mouse, check if it has RNA color property and
* if it does copy the data */
- uiBut *but = ui_but_find_mouse_over(ar, event->x, event->y);
+ for (sa = win->screen->areabase.first; sa && !found; sa = sa->next) {
+ for (ar = sa->regionbase.first; ar && !found; ar = ar->next) {
+ if ((but = ui_but_find_mouse_over(ar, event->x, event->y)) != NULL)
+ found = true;
+ }
+ }
if (but && but->rnaprop && RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) {
if (!drag_info->gamma_corrected)
More information about the Bf-blender-cvs
mailing list