Commit Graph

601 Commits

Author SHA1 Message Date
69d66f98a8 patch [#37114] copypaste for NORMAL buttons (BUT_NORMAL)
from Philipp Oeser (lichtwerk)
2013-10-16 23:42:44 +00:00
af6636bbed Project Pampa request: copy-paste for curve mapping widgets
Use C-c for copy, C-v for paste over the widget.
2013-10-16 17:48:33 +00:00
d4cf5e3605 fix [#37078] Search props don't react on click at the right end (where 'X' is if field not empty) 2013-10-15 00:24:53 +00:00
03f7885b0a id-data eyedropprt, currently only accessible via the Ekey,
We need to investigate ways to add options like this without cluttering the interface.
2013-10-08 15:32:54 +00:00
e8551313f6 e-key to access the eyedropper over a color button. 2013-10-08 13:58:28 +00:00
d41413758d move color button event handling into its own function. 2013-10-08 13:49:42 +00:00
7e5d5e61ae avoid allocating a dummy string for the unlink button. 2013-10-08 13:10:22 +00:00
7a9bc838de pressing enter over a file-text button is ignored (so enter in the file selector works again). 2013-10-04 18:34:28 +00:00
592443816d re-shuffle ifdef for osx to make it more clear 2013-10-02 16:13:24 +00:00
4bc998d0b3 OSX: readd ctrl-a for 'select all' in text(-boxes) against my own conviction for now - really to be discussed 2013-10-02 16:09:09 +00:00
b5fcc340b6 OSX/keys: change to OSX conform cmd-a for 'select-all' in text(-boxes) 2013-10-01 17:47:08 +00:00
74828cc609 Fix #36783: click outside splash screen to close it would not highlight the
button under the mouse, and so clicking the button failed without first
moving the mouse. Similar issues could happen with popups and switching
windows.

The problem is that a notifier was being used to deactivate possible other
activated buttons, but as notifiers are delayed it could undo the correct
activation too. If anyone notices hanging tooltips or other issues after this
fix, please report them.
2013-09-23 23:31:42 +00:00
Lukas Toenne
37b82a2d26 Fix #36226, Select Linked works not in touch with Prefs.
When setting keymap properties to values equalling the RNA default, they will
get "unset" and automatic operator behavior is used. There is no way to
explicitly set the default value as a user.

1) To allow distinguishing uninitialized (not set) properties in the keymap
items, a few changes to the RNA struct comparison function are needed: Instead
of allowing only strict/non-strict comparison of 2 properties A and B in a
struct, this now has 3 modes:
* STRICT: compare only the actual property values (same as 'strict' before)
* UNSET_MATCH_ANY: if either A or B is unset, consider them a match (same as
non-strict before)
* UNSET_MATCH_NONE: if one property is set and the other not, consider them a
mismatch.

The new UNSET_MATCH_NONE mode is useful for keymaps, because it allows keeping
user-defined property values in the keymap even if they match the default
property value (see wm_keymap_diff function in wm_keymap.c)

2) A new operator is added for unsetting ID properties in the RMB context menu
and in user preferences next to keymap properties. This only works on ID
properties and deletes the ID property storage, so that the default value is used.

In the user preferences for keymaps the properties are shown in an inactive
layout to indicate that the default value is used (which some operators such as
the "select linked" op from the report use to trigger automatic behavior). When
the user sets a property it gets set and stays that way until explicitly "unset"
using the new operator.
2013-09-20 09:10:17 +00:00
f801661f3d when handling the escape key, check for press (ignore release events), right mouse already did this.
ensures the escape key isn't handled twice for one press.
2013-09-12 22:48:46 +00:00
630a06dd83 Fix #36682: disable shift+backspace shortcut to delete all text in text fields,
it's too easy to hit accidentally and isn't a standard shortcut. Deleting all
text is quite easy by just pressing backspace right after clicking the text
field anyway.
2013-09-09 14:23:47 +00:00
35cd649c66 rename cursor setting functions to make modal set/restore more clearly related functions. 2013-09-06 22:34:29 +00:00
d685b18c2f remove calls to CTX_wm_region(C) when the region is already known.
also remove unused toggle vars in uiHandleButtonData
2013-08-31 04:22:55 +00:00
3d0e56e8d9 fix for ui glitch, pressing backspace over a button to reset to the default value didnt work for the uilist text button (others too), missing redraw. 2013-08-31 04:11:50 +00:00
658e72f47d minor ui edits
- move addon refresh button into header
- uilist, use icon for sorting by name (gives more room for name, icon is used in fileselector for same purpose).
- rename orderby to sort in rna and flag names.
- simplify BKE_nurb_handle_calc_simple
2013-08-30 11:49:35 +00:00
113997a03c Last uiList patch (for now!): filtering and reordering of shown elements.
Thanks to Brecht for the reviews. :)

This commit adds a show/hide extension below each uiList, containing by default an option to filter and/or reorder items by name (and to reverse those filtering and reordering).

Each derived uiList class in Python can define more specific filtering by implementing callbacks: the draw_filter() function to draw options in UI, and the filter_items() function to effectively filter/reorder items.

Note: the advanced options for vgroups shown as "proof od concept" in patches do not go in trunk for now, we have to find a better way to get those vgroups info for UI code, we can't afford to loop over each vertex here!

And doc (release notes and uiList example) is still to be updated, will do this in next days.
2013-08-29 12:55:31 +00:00
bcf18878a2 Some tweaking to uiList dragsize, to make it more reactive to very quick moves.
Note that, even though not officialy supporting non-UI_UNIT_Y height items (other point like scrollbar size would faill too), we try to maintain a not-that-bad behavior in this case, which implies a bit of black magic (esp. as our ref point is the bottom of the list, which moves when it is resized :/)...
2013-08-28 19:23:15 +00:00
51d399aaab tweak to dragging the ui-list, would lag behind the mouse noticeably. 2013-08-27 20:58:37 +00:00
025bac4570 Small enhancement to grab-resize of uiLists, suggested by plasmasolutions: do not effectively apply auto-size until we stop grabbing, avoid size of uiLists to switch between rows and maxrows while dragging. 2013-08-27 18:56:04 +00:00
6b51c27414 uiLists enhacements: dragresize and better GRID layout.
Many thanks to Brecht for the review!

* You can now drag-resize uiLists (in default or grid layouts).
** Note about "default" size: when you drag below minimal size of the uiList, it will automatically reset to automatic sizing (i.e. size between rows and maxrows, depending on the number of items to show). This often means (e.g. in Materials list with many mat slots) that the list will grow again to maxrows!

* Grid uiLists now have a customizable number of columns (previously it was a fixed value of 9), and they will respect the rows/maxrows settings as well (i.e. show a scrollbar when needed), instead of growing indefinitly!
2013-08-27 15:27:41 +00:00
a62163ada3 remove unused auto-key struct-member from uiAfterFunc, add compiler defines to cppcheck utility script. 2013-08-10 23:27:42 +00:00
f5c66a3676 quiet shadow warnings and remove redundant NULL check 2013-08-07 04:31:05 +00:00
02608d257a add api call for initializing events from the windows eventstate. 2013-07-29 08:29:04 +00:00
d7ff7ad3e9 correct sloppy NULL checks, in interface code:
- uiPupMenuBegin was checking for NULL title but would still crash if it were NULL.
- now tag the function as 'nonnull' and remove NULL checks. make sure NULL isnt passed to it.
2013-07-27 14:17:20 +00:00
9c0e331f81 fix/workaround [#36269] Crash upon right click on menu and left click on item 2013-07-24 20:53:24 +00:00
b09de65c8d internal change for ui_mouse_motion_towards_*** use,
only run these checks for buttons using the UI_BLOCK_MOVEMOUSE_QUIT flag.
no functional change but makes debugging easier and was calculating mouse motion in relation to some popups for no reason.
2013-07-24 20:50:30 +00:00
b05d5ed657 let the enter key active text buttons and the unlink button 2013-07-23 14:55:47 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
8ffa38b402 fix for missing break statements in switch, some key shortcuts and notifiers were falling through when its obviously incorrect to do so. 2013-07-13 14:21:36 +00:00
b0312d5991 fix [#35948] Toggle-Draw AutoKeyframe Bug 2013-07-10 01:13:24 +00:00
a3643ee3d6 fix [#36073] Changing list items misses undo push 2013-07-09 23:40:53 +00:00
381df05641 Fix #36030: datablock drag and drop to buttons not working with a certain number
of objects in the scene.
2013-07-09 11:31:49 +00:00
50148a0f53 edit on r57996, no need to use for loop. 2013-07-04 20:07:00 +00:00
7eb5cf8699 Fix #36001: crashing copying long strings in text buttons. 2013-07-04 14:37:38 +00:00
42f6136da8 Fix #35991: show warning message to when trying to edit driven values in number buttons. 2013-07-03 20:37:07 +00:00
063be8fdc0 Fix [#35750] list items in properties editor (text colors not following list item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!).

This commit:
* Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item.
* Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set.
* When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type.
* Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT.

Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state().

Thanks to Brecht for the review and advices.
2013-06-26 07:28:55 +00:00
9d4cc7885d fix for filesel autocomplete, it had the annoying behavior if you entered in a non-existing name, of executing it and then asking to add the dir. 2013-06-19 11:53:48 +00:00
3c54d1b87a alternate fix for r57562. check if the mouse is over the parent menu. 2013-06-19 06:31:37 +00:00
93134c26f9 fix [#35792] Submenus not opening properly on mouse move
caused by own fix for [#35346], now only apply wiggle room for toplevel menus.
2013-06-19 06:01:38 +00:00
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00
8b4bca6cf0 fix [#35713] Set Origin not waiting for user input.
Only activate search-box items on mouse-release,
Otherwise this gives odd behavior when using the operator-search popup since some tools expect the mouse buttons not to be held when activating which includes operators that have their own popup menus.
2013-06-13 01:39:07 +00:00
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
c24be7ec6e Usablity:
Textbuttons: double click now selects entire words (like on file path segements)
Triple click was requested too, but that's not a WM event type yet.
2013-06-07 15:42:26 +00:00
b537bc011b fix for missing undo push for drag-toggle. 2013-06-03 19:52:53 +00:00
0c004723fe fix [#35434] Segmentation fault switching screen layout from python
(take 2), only free popup handlers.
2013-06-02 20:59:00 +00:00
ebda20150d fix for crash with toggle-drag on a popup (when the popup is closed while dragging). 2013-05-17 13:54:44 +00:00