Fix for #1040: "Add file to .gitignore" showing incorrect preview
"Add to .gitignore" layout tweaks
Merge pull request #2083 from qgppl/fix-1040

Fix 1040