3d renderer does not react right away to rendering options change

Bug #1756816 reported by Alessandro Gatti
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Unassigned

Bug Description

Reproduction steps:

* Open a board in PCBNew.
* Show the 3d rendering canvas.
* Make sure the renderer is in OpenGL mode.
* Toggle "Realistic mode" option.

The display should refresh to show the board with the new options but it will only do that when the board is rotated or zoomed in.

Same thing applies for all entries in "Render options" -> "Material properties" and "OpenGL options" -> "Show copper thickness"

System information:

ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102

KiCad information:

Packaged on 20180316-043049
KiCad revision: r3b0a758
KiCad CMake Settings: -DDEFAULT_INSTALL_PATH=/Library/Application Support/kicad
-DCMAKE_C_COMPILER=/usr/bin/clang
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
-DwxWidgets_CONFIG_EXECUTABLE=../wx/wx-bin/bin/wx-config
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON
-DPYTHON_EXECUTABLE=/usr/bin/python
-DPYTHON_SITE_PACKAGE_PATH=/Volumes/SSD/workspace/osx-kicad-adam-head/wx/wx-bin/lib/python2.7/site-packages
-DKICAD_USE_OCE=ON
-DOCE_DIR=/Users/kicad/homebrew/opt/oce/OCE.framework/Versions/0.17/Resources/
-DKICAD_SPICE=ON
-DKICAD_REPO_NAME=maser-c4osx
-DCMAKE_INSTALL_PREFIX=../bin
-DCMAKE_BUILD_TYPE=RelWithDebInfo
Build script revision: r3b0a758

Thank you for your time,
Alessandro

Revision history for this message
Alessandro Gatti (agatti) wrote :

The fix for this one is simple, but I wonder why some options in eda_3d_viewer.cpp use "ReloadRequest()" and others "m_canvas->RequestRefresh()". ReloadRequest() requires the board to be rotated or zoomed in or whatever, but are there any cases for the menu option callbacks to be invoked with m_canvas being null?

Changed in kicad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Jeff Young (jeyjey) wrote :

@Alesandro, ReloadRequest() re-builds the 3D model. RefreshRequest() just redraws it. The latter is of course much faster.

If this code already does the expensive one, then it won't hurt to add the RequestRefresh().

Jeff Young (jeyjey)
Changed in kicad:
status: Triaged → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.