Bug report #17845

Setting Raster Transparency using "Add values from display" doesn't work

Added by Michel Stuyts 10 days ago. Updated 7 days ago.

Status:In Progress
Priority:High
Assignee:Alessandro Pasotti
Category:Rasters
Affected QGIS version:master Regression?:Yes
Operating System:Windows 10 & Ubuntu Linux 16.04 LTS Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:Yes

Description

If I try to set the Transparent Pixels using "Add values from display" it gives no result. If I close the Layer Properties window after using "Add values from display" using OK or Cancel, QGIS becomes unresponsive on Windows and closes without a warning on Ubuntu.

Also the Layer Properties window remains minimized after clicking in the map window when trying to use "Add values from display".

History

#1 Updated by Alessandro Pasotti 10 days ago

  • Status changed from Open to Feedback

Can you please add step-by-step procedure to reproduce the issue and if possible a minimal project with a small dataset?

#2 Updated by Michel Stuyts 10 days ago

I tested it with multiple raster-files (TIF and PNG). One of those files can be downloaded from: https://downloadagiv.blob.core.windows.net/winterbedkaart/Winterbedkaart+(Watertoets).zip

  1. Start a new project in QGIS 2.99
  2. Add the downloaded tiff-file (Wtrbed.tif)
  3. Open the layer Properties Window
  4. Go to the "Transparency" tab
  5. Click on the "add values from display" button (now the Properties Window remains the same size on Ubuntu Linux and minimizes on Windows)
  6. Click somewhere on the white (or another color) part in the Map Window (now the Properties Window remains minimized on Windows)
  7. On Windows double click on the minimized topbar of the Properties Window on the bottom left of the screen to maximize it. (now no color values are added to the "Transparent pixel list" on both Windows and Ubuntu Linux)
  8. Click on the OK or Cancel button
After these steps the effect is different on Windows and Ubuntu Linux:
  • On an Windows 10 machine: the Properties window closes, but clicking anywhere in the main window has no effect. QGIS can only be closed by using Windows Task Manager and killing the process
  • On an Ubuntu Linux machine: QGIS closes without a warning.

#3 Updated by Michel Stuyts 10 days ago

In the Layer Styling Panel, the "Add values from display" button in the Transparency Tab works as it should.

#4 Updated by Alessandro Pasotti 7 days ago

  • Assignee set to Alessandro Pasotti

Thanks for adding the information, looking at this bug now ...

#5 Updated by Alessandro Pasotti 7 days ago

  • Priority changed from Normal to High
  • Regression? changed from No to Yes

#6 Updated by Alessandro Pasotti 7 days ago

  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Feedback to In Progress

PR: https://github.com/qgis/QGIS/pull/6068
Tested on xenial, needs to be tested on windows/mac.

Also available in: Atom PDF