Adding RGBLF preview modes support for Before/After views (issue 1234)
This commit is contained in:
@@ -1249,6 +1249,7 @@ void EditorPanel::beforeAfterToggled () {
|
|||||||
if (beforeIpc)
|
if (beforeIpc)
|
||||||
beforeIpc->stopProcessing ();
|
beforeIpc->stopProcessing ();
|
||||||
iarea->setBeforeAfterViews (NULL, iarea);
|
iarea->setBeforeAfterViews (NULL, iarea);
|
||||||
|
iarea->imageArea->iLinkedImageArea = NULL;
|
||||||
delete beforeIarea;
|
delete beforeIarea;
|
||||||
beforeIarea = NULL;
|
beforeIarea = NULL;
|
||||||
if (beforeIpc)
|
if (beforeIpc)
|
||||||
@@ -1307,6 +1308,10 @@ void EditorPanel::beforeAfterToggled () {
|
|||||||
beforeIarea->imageArea->setPreviewHandler (beforePreviewHandler);
|
beforeIarea->imageArea->setPreviewHandler (beforePreviewHandler);
|
||||||
beforeIarea->imageArea->setImProcCoordinator (beforeIpc);
|
beforeIarea->imageArea->setImProcCoordinator (beforeIpc);
|
||||||
|
|
||||||
|
beforeIarea->imageArea->setPreviewModePanel(iarea->imageArea->previewModePanel);
|
||||||
|
beforeIarea->imageArea->setIndicateClippedPanel(iarea->imageArea->indClippedPanel);
|
||||||
|
iarea->imageArea->iLinkedImageArea = beforeIarea->imageArea;
|
||||||
|
|
||||||
iarea->setBeforeAfterViews (beforeIarea, iarea);
|
iarea->setBeforeAfterViews (beforeIarea, iarea);
|
||||||
beforeIarea->setBeforeAfterViews (beforeIarea, iarea);
|
beforeIarea->setBeforeAfterViews (beforeIarea, iarea);
|
||||||
|
|
||||||
|
@@ -49,6 +49,7 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p) {
|
|||||||
|
|
||||||
dirty = false;
|
dirty = false;
|
||||||
ipc = NULL;
|
ipc = NULL;
|
||||||
|
iLinkedImageArea = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageArea::~ImageArea () {
|
ImageArea::~ImageArea () {
|
||||||
|
@@ -66,11 +66,14 @@ class ImageArea : public Gtk::DrawingArea, public CropWindowListener {
|
|||||||
ZoomPanel* zoomPanel;
|
ZoomPanel* zoomPanel;
|
||||||
IndicateClippedPanel* indClippedPanel;
|
IndicateClippedPanel* indClippedPanel;
|
||||||
PreviewModePanel* previewModePanel;
|
PreviewModePanel* previewModePanel;
|
||||||
|
ImageArea* iLinkedImageArea; // used to set a reference to the Before image area, which is set when before/after view is enabled
|
||||||
|
|
||||||
ImageArea (ImageAreaPanel* p);
|
ImageArea (ImageAreaPanel* p);
|
||||||
~ImageArea ();
|
~ImageArea ();
|
||||||
|
|
||||||
void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_);
|
void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_);
|
||||||
|
void setPreviewModePanel(PreviewModePanel* previewModePanel_){previewModePanel = previewModePanel_;};
|
||||||
|
void setIndicateClippedPanel(IndicateClippedPanel* indClippedPanel_){indClippedPanel = indClippedPanel_;};
|
||||||
|
|
||||||
void getScrollImageSize (int& w, int& h);
|
void getScrollImageSize (int& w, int& h);
|
||||||
void getScrollPosition (int& x, int& y);
|
void getScrollPosition (int& x, int& y);
|
||||||
|
@@ -61,4 +61,9 @@ void IndicateClippedPanel::toggleClipped (bool highlights) {
|
|||||||
|
|
||||||
void IndicateClippedPanel::buttonToggled () {
|
void IndicateClippedPanel::buttonToggled () {
|
||||||
imageArea->queue_draw ();
|
imageArea->queue_draw ();
|
||||||
|
|
||||||
|
// this will redraw the linked Before image area
|
||||||
|
// which is set when before/after view is enabled
|
||||||
|
if (imageArea->iLinkedImageArea!=NULL)
|
||||||
|
imageArea->iLinkedImageArea->queue_draw ();
|
||||||
}
|
}
|
||||||
|
@@ -140,4 +140,9 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) {
|
|||||||
connFocusMask.block(false);
|
connFocusMask.block(false);
|
||||||
|
|
||||||
imageArea->queue_draw ();
|
imageArea->queue_draw ();
|
||||||
|
|
||||||
|
// this will redraw the linked Before image area
|
||||||
|
// which is set when before/after view is enabled
|
||||||
|
if (imageArea->iLinkedImageArea!=NULL)
|
||||||
|
imageArea->iLinkedImageArea->queue_draw ();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user