Wings 3D Development Forum
Micheus ... Selection Groups scroll vs Geometry Graph Scroll - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6)
+--- Thread: Micheus ... Selection Groups scroll vs Geometry Graph Scroll (/showthread.php?tid=980)



Micheus ... Selection Groups scroll vs Geometry Graph Scroll - ggaliens - 12-03-2014

Here's my silly hack to make Selection Groups scrolling a bit more delicate when neeed. It would be better to add the thumb-region handling that is supported by geometry graph.

Would you know how to do it right Micheus ? Or more important ... would you have a go at finding right solution ?

Code:
event(PAGE_UP_DOWN, Ost) when PAGE_UP_DOWN == scroll_page_up orelse PAGE_UP_DOWN == scroll_page_down->
    Mod = sdl_keyboard:getModState(),
    case {PAGE_UP_DOWN, Mod} of
         {scroll_page_up, 0}   ->  zoom_step(-lines(Ost), Ost);
         {scroll_page_down, 0} ->  zoom_step(lines(Ost), Ost);
         {scroll_page_up, _}   ->  zoom_step(-1, Ost);
         {scroll_page_down, _} ->  zoom_step(1, Ost)
    end;

I was too lazy to do a better compare of the wpc_sel_win events to wings_shape events.

Maybe slightly better idea ...

Code:
event(#keyboard{scancode=72},Ost) ->
    zoom_step(-1, Ost);
event(#keyboard{scancode=80},Ost) ->
    zoom_step(1, Ost);



RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - micheus - 12-04-2014

(12-03-2014, 11:06 PM)ggaliens Wrote: It would be better to add the thumb-region handling that is supported by geometry graph.
yeah, you are right. And yes, the second options seems to be better - no time to check this now.

About to use keys I'm not sure it would be productive to implement it. This king of window requires the mouse be over in order to get the focus and then try to capture the keyboard event. By now I think it's easier to use it to scroll the items.

Add support to key handling was something I thought about (sometime after release it) in order allow us to make a multiple selection. Something that I didn't spend time thinking about until know if this kind of windows will be replaced by some wxWidgets control.


RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - ggaliens - 12-04-2014

The keyboard handle is in there. I can use the up and down with the code shown. Works well for me. But yeah ... would also be good to have the thumb scroller working some day. Maybe we wait for wxWidgets stuff and see what happens.


RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - ggaliens - 12-05-2014

Today I added code so that when a user holds down "CTRL" (control key) while
clicking through list of selection groups ... it does UNION of groups to the sel=SEL,
current selection. This is a very typical behavior for list clicking in Windows.

Micheus ... can we work together to add a few changes and push them into GIT ?

I don't want to step on anyones toes or interfere. But I need this streamlined stuff.

:-) :-) :-) Happy times !

Pretty sure that save and reload of a hidden object destroys any selection groups belonging to that object.
Do you agree ?

I'm not a big fan of that ... it is one thing to hide hidden groups from the selections group window ... it is another thing to delete them when a user might want to recall them. I can think about how to change code. But maybe you have already considered this in turn and it was "tricky problem".


RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - micheus - 12-05-2014

I think different about multi selection operation. Yeah, it can produce the selections, but also need to adjust the context menu to allow things like delete and group them (turn them one).

As I told no much time these days. Is December, time run fast. Smile
I know you probably will implement this first than I could sit down to check it. Keep doing. If I have time to play with it I'll let you know. Wink
Answer posts is easier - I can use my wife's tablet (even hating it Smile )


RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - ggaliens - 12-05-2014

There is something very hard to deal with with regards to how selection groups become "invalid" and then deleted. It probably comes from using the wings_sel:valid test to see of a group should be removed. I think the proper or ideal test would be more nuanced than just that ... more tricky.

I hide and re-show objects all the time. And if I SAVE a file with hidden objects ... pretty sure selection gorups are deleted. Not a horrible behavior ... but perhaps not the best behavior either. IT has caught me off guard many times ... selection groups disappearing when I don't expect it to happen. It should happen just on a geometry change to #we{}.


RE: Micheus ... Selection Groups scroll vs Geometry Graph Scroll - micheus - 12-05-2014

I didn't notice that nefore and no one had reported this behavior.
I'll take note of it as a bug to be checked. In case you don't find it first. Smile