Bug report #17845
Setting Raster Transparency using "Add values from display" doesn't work
Status: | Closed | ||
---|---|---|---|
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: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 25740 |
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 almost 7 years 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 almost 7 years 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
- Start a new project in QGIS 2.99
- Add the downloaded tiff-file (Wtrbed.tif)
- Open the layer Properties Window
- Go to the "Transparency" tab
- Click on the "add values from display" button (now the Properties Window remains the same size on Ubuntu Linux and minimizes on Windows)
- Click somewhere on the white (or another color) part in the Map Window (now the Properties Window remains minimized on Windows)
- 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)
- Click on the OK or Cancel button
- 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 almost 7 years 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 almost 7 years ago
- Assignee set to Alessandro Pasotti
Thanks for adding the information, looking at this bug now ...
#5 Updated by Alessandro Pasotti almost 7 years ago
- Priority changed from Normal to High
- Regression? changed from No to Yes
#6 Updated by Alessandro Pasotti almost 7 years ago
- Status changed from Feedback to In Progress
- Pull Request or Patch supplied changed from No to Yes
PR: https://github.com/qgis/QGIS/pull/6068
Tested on xenial, needs to be tested on windows/mac.
#7 Updated by Anonymous almost 7 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|75e613c3adbe7465af29b3eaef3c7b0d612ace5a.
#8 Updated by Michel Stuyts almost 7 years ago
- Status changed from Closed to Reopened
The main part of this issue (QGIS crashing or blocking) is solved, but a minor part of it still isn't ok. The issue is different on Ubuntu and Windows.
On Ubuntu Linux:- Start a new project in QGIS 2.99
- Add the downloaded tiff-file (Wtrbed.tif)
- Open the layer Properties Window
- Go to the "Transparency" tab
- Click on the "add values from display" button
- Now the Properties Window disappears (I think it's closed) and the cursor changes to a cross
- Now click somewhere in the map and the cursor changes back to an arrow, but after that nothing happens anymore. There is nothing added to the transparent pixel list when the Properties Window is reopened.
- Start a new project in QGIS 2.99
- Add the downloaded tiff-file (Wtrbed.tif)
- Open the layer Properties Window
- Go to the "Transparency" tab
- Click on the "add values from display" button
- Now the Properties Window minimizes and the cursor changes to a cross
- Now click somewhere in the map and the cursor changes back to an arrow, but the Properties Window remains minimized
- Now double click on the minimized title bar of the Properties Window to enlarge it again.
- The clicked on color value is added to the transparent pixel list.
- The desired color is transparent.
- Start a new project in QGIS 2.99
- Add the downloaded tiff-file (Wtrbed.tif)
- Open the layer Properties Window
- Go to the "Transparency" tab
- Click on the "add values from display" button
- Now the Properties Window minimizes and the cursor changes to a cross
- Now click somewhere in the map and the cursor changes back to an arrow, but the Properties Window remains minimized
- Open the layer Properties Window
- Go to the "Transparency" tab
- Click on the "add values from display" button
- Now the Properties Window minimizes and the cursor changes to a cross
- Now click somewhere in the map and the cursor changes back to an arrow, but the Properties Window remains minimized
- Now double click on the first minimized title bar of the Properties Window to enlarge it again.
- Now double click on the second minimized title bar of the Properties Window to enlarge it again.
- The clicked on color value is added once to each transparent pixel list.
- The desired color is transparent.
#9 Updated by Alessandro Pasotti almost 7 years ago
I see: apparently the showMinimized function behaves differently on Linux and Windows (and nobody knows about Mac)
I'm testing (on Linux) and I observe a different behavior on KDE than what you've reported.
Btw, I see a possible solution in completely hiding the dialog instead of trying to minimize it.
I'll make a new PR with this new approach, I'd really appreciate if you could test it when ready.
#10 Updated by Alessandro Pasotti almost 7 years ago
New PR https://github.com/qgis/QGIS/pull/6294
Works fine on Win 10 and Kubuntu Xenial.
#11 Updated by Anonymous almost 7 years ago
- Status changed from Reopened to Closed
Applied in changeset qgis|e435d79d6c4de64f1f45153db288f14495296cc2.
#12 Updated by Alessandro Pasotti almost 7 years ago
- Resolution set to fixed/implemented
Please test this new patch
#13 Updated by Michel Stuyts almost 7 years ago
Problem solved! It works in Ubuntu 16.04 and Windows 10. Thank you very much.
#14 Updated by Alessandro Pasotti almost 7 years ago
You are welcome! Thank you for the feed-back and thanks to all QGIS sponsors and donors that made this happen!