OPENGL_GAL::ClearScreen(color) doesn't set color

Bug #1669098 reported by Chris Pavlina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Maciej Suminski

Bug Description

I'm trying to make pcbnew background color configurable, and running into an issue. The background color is passed to GAL::ClearScreen(), but this doesn't appear to work for OPENGL_GAL.

Trivial test is to change line 187 (inside GetBackgroundColor) of include/painter.h to something silly like:

    return RED;

Works in Cairo, but in OpenGL the background is still black.

Application: kicad
Version: (2017-03-01 revision 9f1e15475)-master, debug build
Libraries: wxWidgets 3.0.2
           libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.11 libpsl/0.17.0 (+libicu/58.2) libssh2/1.8.0
Platform: Linux 4.9.11-1-ARCH x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.63.0
Curl: 7.52.1
KiCad - Compiler: GCC 6.3.1 with C++ ABI 1010
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=OFF
                  KICAD_SCRIPTING_MODULES=OFF
                  KICAD_SCRIPTING_WXPYTHON=OFF
                  KICAD_SCRIPTING_ACTION_MENU=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

Tags: cern gal pcbnew
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision ca985791bcd647d380069fc56c79fe04c171e156
https://git.launchpad.net/kicad/patch/?id=ca985791bcd647d380069fc56c79fe04c171e156

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Maciej Sumiński (orsonmmz)
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Thanks for looking at such a low priority bug so quickly! Unfortunately the fix doesn't work for me :P

To clarify from my "trivial test", since "return RED" makes the compiler complain (I'm not sure if this is defined as an object with static linkage or inline...), I did:

include/painter.h:
     inline const COLOR4D& GetBackgroundColor() const
     {
+ static const COLOR4D red = RED;
+ return *&red;
         return m_backgroundColor;
     }

Red in Cairo, still black in GL :(

Changed in kicad:
status: Fix Committed → New
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Fixed by Tom in 32185ddcd3.

Changed in kicad:
status: New → 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.