Bugfix for issue #476

crash: open new image while zoom window is open
This commit is contained in:
ffsup2
2011-01-19 20:10:21 +01:00
parent eb793cb46a
commit 55591bfa2a
2 changed files with 16 additions and 3 deletions

View File

@@ -402,14 +402,13 @@ void EditorPanel::close () {
delete previewHandler;
previewHandler= NULL;
rtengine::StagedImageProcessor::destroy (ipc);
ipc = NULL;
if(iarea)
{
iarea->imageArea->setPreviewHandler (NULL);
iarea->imageArea->setImProcCoordinator (NULL);
}
rtengine::StagedImageProcessor::destroy (ipc);
ipc = NULL;
navigator->previewWindow->setPreviewHandler (NULL);
// navigator->previewWindow->setImageArea (NULL);

View File

@@ -76,8 +76,22 @@ void ImageArea::on_resized (Gtk::Allocation& req) {
}
void ImageArea::setImProcCoordinator (rtengine::StagedImageProcessor* ipc_) {
if( !ipc_ ){
focusGrabber = NULL;
std::list<CropWindow*>::iterator i = cropWins.begin();
if( i!=cropWins.end() ){
(*i)->getPosition (lastClosedX, lastClosedY);
(*i)->getSize (lastClosedW, lastClosedH);
}
for( ;i!=cropWins.end();i++ ){
delete *i;
}
cropWins.clear();
mainCropWindow->setObservedCropWin (NULL);
}
ipc = ipc_;
}
void ImageArea::setPreviewHandler (PreviewHandler* ph) {