Crop detail start with zoom 100%

Removed zoom11 in CropWindow constructor (zoom 1:1 prevents optimization during first image load ).
This commit is contained in:
ffsup2
2010-11-07 14:51:35 +01:00
parent 1d2f113a24
commit 3d2c904676
2 changed files with 7 additions and 4 deletions

View File

@@ -93,7 +93,6 @@ CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_)
minWidth = bsw + iw + 2*sideBorderWidth;
setSize (100, 100);
zoom11();
cropHandler.newImage (ipc_);
cropHandler.setPosition (0,0);
cropHandler.setEnabled (true);

View File

@@ -231,6 +231,7 @@ void ImageArea::unGrabFocus () {
void ImageArea::addCropWindow () {
CropWindow* cw = new CropWindow (this, ipc);
cw->zoom11();
cw->setCropGUIListener (cropgl);
cw->setPointerMotionListener (pmlistener);
cropWins.push_front (cw);
@@ -248,10 +249,13 @@ void ImageArea::addCropWindow () {
cw->setPosition (col*get_width()/K + hBorder/2 + layer*30, row*get_height()/K + vBorder/2 + layer*30);
}
else {
cw->setSize (lastClosedX, lastClosedY);
cw->setPosition (lastClosedW, lastClosedH);
cw->setPosition (lastClosedX, lastClosedY);
cw->setSize(lastClosedW, lastClosedH);
}
int x0,y0,w,h,wc,hc;
mainCropWindow->getCropRectangle(x0,y0,w,h );
cw->getCropSize(wc,hc);
cw->setCropPosition(x0+w/2-wc/2,y0+h/2-hc/2);
mainCropWindow->setObservedCropWin (cropWins.front());
queue_draw ();
}