Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/nviz: make tools panel verically and horizontally scrollable for Single Window Mode #3089

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Jul 16, 2023

Describe the bug
With Single Window Mode 3D view mode tools pane (default width) has missing horizontal scrollbar or horizontal and vertical scrollbar also.

To Reproduce
Steps to reproduce the behavior:

  1. Launch wxGUI with Single Window Mode
  2. Display some raster map e.g. elevation d.rast elevation
  3. Switch from 2D view to 3D view
  4. It is not possible change some 3D view settings on the pages View, Data, Appearance, Analysis, Animation with default pane width due tools panel has missing horizontal or vertical scrollbar by default.

Expected behavior
3D view settings pages View, Data, Appearance, Analysis, Animation with default pane width should have horizontal or vertical scrollbar.

Screenshots

A. View page

Default behavior Expected behavior

B. Data page

Default behavior Expected behavior

C. Appearance page

Default behavior Expected behavior

D. Analysis page

Default behavior Expected behavior

E. Animation page

Default behavior Expected behavior

System description:

  • Operating System: all
  • GRASS GIS version: 8.2, 8.3, 8.4.dev

@tmszi tmszi added bug Something isn't working GUI wxGUI related backport to 8.3 labels Jul 16, 2023
@tmszi tmszi added this to the 8.4.0 milestone Jul 16, 2023
@cmbarton
Copy link
Contributor

This is a significant improvement. Thanks.

@tmszi tmszi merged commit a0469b7 into OSGeo:main Sep 26, 2023
@tmszi tmszi deleted the wxgui-nviz-make-tools-panel-scrollable branch September 26, 2023 11:57
@cmbarton
Copy link
Contributor

@tmszi I just happened to be testing the new v. 8.3.1 and found that while the new scroll bars work fine in the NVIZ data tab, they raise an error in all other tabs/windows.

Traceback (most recent call last):
  File "/Applications/GRASS-
8.3.app/Contents/Resources/lib/python3.11/site-
packages/wx/core.py", line 2346, in Notify

self.notify()
  File "/Applications/GRASS-
8.3.app/Contents/Resources/lib/python3.11/site-
packages/wx/core.py", line 3552, in Notify

self.result = self.callable(*self.args, **self.kwargs)

  File "/Applications/GRASS-
8.3.app/Contents/Resources/gui/wxpython/nviz/tools.py", line
238, in UpdateScrolling

length = foldpanel.GetPanelsLength(collapsed=0, expanded=0)
AttributeError: 'ScrollBar' object has no attribute 'GetPanelsLength'

@tmszi
Copy link
Member Author

tmszi commented Oct 27, 2023

@tmszi I just happened to be testing the new v. 8.3.1 and found that while the new scroll bars work fine in the NVIZ data tab, they raise an error in all other tabs/windows.

I can't reproduce it under GNU/Linux (wxGTK). Could you please send the exact steps how to reproduce it? It looks like it will be a MacOS (wxMAC) specific bug.

GRASS nc_basic_spm_grass7/PERMANENT:~ > python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.11.5 (main, Sep 16 2023, 22:27:21) [GCC 12.3.1 20230526]
4.2.0 gtk3 (phoenix) wxWidgets 3.2.2.1

@cmbarton
Copy link
Contributor

cmbarton commented Oct 27, 2023

To reproduce:

  1. Select 3D view display (NVIZ)
  2. NVIZ opens in the single window interface (note the scroll bars on the side and bottom)
  3. Select one of the other NVIZ tabs (e.g., "Data" or "Appearance")
  4. No scroll bars and error in the console
  5. The same with selecting all other tabs except for "View"

Whatever fix was done to enable scroll bars in view is missing something for the other NVIZ windows.

@tmszi
Copy link
Member Author

tmszi commented Oct 27, 2023

Whatever fix was done to enable scroll bars in view is missing something for the other NVIZ windows.

Thanks, I followed your steps but under wxGTK (GNU/Linux OS) NVIZ pages (tabs) horizontal and vertical scrollbars work as expected.

@petrasovaa
Copy link
Contributor

Could you create an issue for this? There is apparently some problem since the object foldpanel is not the correct class, so there is some problem with object hierarchy.

@cmbarton
Copy link
Contributor

cmbarton commented Nov 6, 2023

How about just reopening this one?

@tmszi
Copy link
Member Author

tmszi commented Nov 6, 2023

I don't have direct macOS access, but I found a way to install it in VirtualBox and I will try to reproduce the bug (and open issue) soon as possible.

@nilason
Copy link
Contributor

nilason commented Nov 7, 2023

Could you create an issue for this? There is apparently some problem since the object foldpanel is not the correct class, so there is some problem with object hierarchy.

That is most likely the case. Maybe related, maybe not, collapsing and expanding foldpanels doesn't work as expected either. Will open new issue.

@cmbarton
Copy link
Contributor

Perhaps the best way to deal with this is to have the NVIZ control window open outside the single window interface (SWI). There are other tools that still do this. The NVIZ control window has so many different pages/tabs and interactive features that it is difficult to make it useable in the control section of the SWI. I almost always have to pop it out to use it fully, even if the scroll bars worked. Do users really want to have to scroll around just to use this control window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants