Hotfix for issue #3480.
This commit is contained in:
@@ -110,6 +110,16 @@ void CropHandler::sizeChanged (int x, int y, int ow, int oh) // the ipc notif
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CropHandler::isFullDisplay ()
|
||||||
|
{
|
||||||
|
int w, h;
|
||||||
|
getFullImageSize(w, h);
|
||||||
|
if (!w) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return cropW == w && cropH == h;
|
||||||
|
}
|
||||||
|
|
||||||
double CropHandler::getFitCropZoom ()
|
double CropHandler::getFitCropZoom ()
|
||||||
{
|
{
|
||||||
double z1 = (double) wh / cropParams.h;
|
double z1 = (double) wh / cropParams.h;
|
||||||
|
@@ -100,6 +100,7 @@ public:
|
|||||||
float getZoomFactor ();
|
float getZoomFactor ();
|
||||||
double getFitZoom ();
|
double getFitZoom ();
|
||||||
double getFitCropZoom();
|
double getFitCropZoom();
|
||||||
|
bool isFullDisplay ();
|
||||||
void setWSize (int w, int h);
|
void setWSize (int w, int h);
|
||||||
void getWSize (int& w, int &h);
|
void getWSize (int& w, int &h);
|
||||||
void getAnchorPosition (int& x, int& y);
|
void getAnchorPosition (int& x, int& y);
|
||||||
|
@@ -1728,7 +1728,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams.enabled) {
|
||||||
int cropX, cropY;
|
int cropX, cropY;
|
||||||
cropHandler.getPosition (cropX, cropY);
|
cropHandler.getPosition (cropX, cropY);
|
||||||
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom() );
|
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (observedCropWin) {
|
if (observedCropWin) {
|
||||||
@@ -1805,7 +1805,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
|||||||
iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0);
|
iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0);
|
||||||
|
|
||||||
if (cropHandler.cropParams.enabled) {
|
if (cropHandler.cropParams.enabled) {
|
||||||
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom());
|
drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (observedCropWin) {
|
if (observedCropWin) {
|
||||||
|
Reference in New Issue
Block a user