Crop guides are displayed incorrectly when image is zoomed in, Issue 2666

This commit is contained in:
Ingo
2015-03-11 20:01:20 +01:00
parent 1addf4bf3c
commit c071095c56
7 changed files with 109 additions and 61 deletions

View File

@@ -122,14 +122,15 @@ std::vector<Glib::RefPtr<Gdk::Pixbuf> > FileBrowserEntry::getIconsOnImageArea ()
}
void FileBrowserEntry::customBackBufferUpdate (Cairo::RefPtr<Cairo::Context> c) {
if (state==SCropSelecting || state==SResizeH1 || state==SResizeH2 || state==SResizeW1 || state==SResizeW2 || state==SResizeTL || state==SResizeTR || state==SResizeBL || state==SResizeBR || state==SCropMove)
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, cropParams);
else {
rtengine::procparams::CropParams cparams = thumbnail->getProcParams().crop;
if (cparams.enabled && !thumbnail->isQuick()) // Quick thumb have arbitrary sizes, so don't apply the crop
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, cparams);
}
if(scale != 1.0 && cropParams.enabled) { // somewhere in pipeline customBackBufferUpdate is called when scale == 1.0, which is nonsense for a thumb
if (state==SCropSelecting || state==SResizeH1 || state==SResizeH2 || state==SResizeW1 || state==SResizeW2 || state==SResizeTL || state==SResizeTR || state==SResizeBL || state==SResizeBR || state==SCropMove)
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, cropParams, true, false);
else {
rtengine::procparams::CropParams cparams = thumbnail->getProcParams().crop;
if (cparams.enabled && !thumbnail->isQuick()) // Quick thumb have arbitrary sizes, so don't apply the crop
drawCrop (c, prex, prey, prew, preh, 0, 0, scale, cparams, true, false);
}
}
}
void FileBrowserEntry::getIconSize (int& w, int& h) {