Don't create Metadata panel for batch editor, #4140
This commit is contained in:
@@ -25,31 +25,14 @@
|
|||||||
|
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolPanelCoordinator(), somethingChanged(false), parent(parent)
|
BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolPanelCoordinator(true), somethingChanged(false), parent(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
blockedUpdate = false;
|
blockedUpdate = false;
|
||||||
// remove exif panel and iptc panel
|
|
||||||
std::vector<ToolPanel*>::iterator epi = std::find (toolPanels.begin(), toolPanels.end(), exifpanel);
|
|
||||||
|
|
||||||
if (epi != toolPanels.end()) {
|
|
||||||
toolPanels.erase (epi);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<ToolPanel*>::iterator ipi = std::find (toolPanels.begin(), toolPanels.end(), iptcpanel);
|
|
||||||
|
|
||||||
if (ipi != toolPanels.end()) {
|
|
||||||
toolPanels.erase (ipi);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toolBar) {
|
if (toolBar) {
|
||||||
toolBar->setBatchMode ();
|
toolBar->setBatchMode ();
|
||||||
}
|
}
|
||||||
|
|
||||||
toolPanelNotebook->remove_page (*metadataPanel);
|
|
||||||
metadataPanel = nullptr;
|
|
||||||
toiM = nullptr;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < toolPanels.size(); i++) {
|
for (size_t i = 0; i < toolPanels.size(); i++) {
|
||||||
toolPanels[i]->setBatchMode (true);
|
toolPanels[i]->setBatchMode (true);
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
using namespace rtengine::procparams;
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
exposurePanel = Gtk::manage (new ToolVBox ());
|
exposurePanel = Gtk::manage (new ToolVBox ());
|
||||||
@@ -70,8 +70,10 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false
|
|||||||
prsharpening = Gtk::manage (new PrSharpening());
|
prsharpening = Gtk::manage (new PrSharpening());
|
||||||
crop = Gtk::manage (new Crop ());
|
crop = Gtk::manage (new Crop ());
|
||||||
icm = Gtk::manage (new ICMPanel ());
|
icm = Gtk::manage (new ICMPanel ());
|
||||||
exifpanel = Gtk::manage (new ExifPanel ());
|
if(!batch) {
|
||||||
iptcpanel = Gtk::manage (new IPTCPanel ());
|
exifpanel = Gtk::manage (new ExifPanel ());
|
||||||
|
iptcpanel = Gtk::manage (new IPTCPanel ());
|
||||||
|
}
|
||||||
wavelet = Gtk::manage (new Wavelet ());
|
wavelet = Gtk::manage (new Wavelet ());
|
||||||
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
|
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
|
||||||
hsvequalizer = Gtk::manage (new HSVEqualizer ());
|
hsvequalizer = Gtk::manage (new HSVEqualizer ());
|
||||||
@@ -99,111 +101,68 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false
|
|||||||
// Medium -> High ISO
|
// Medium -> High ISO
|
||||||
|
|
||||||
addPanel (colorPanel, whitebalance);
|
addPanel (colorPanel, whitebalance);
|
||||||
toolPanels.push_back (whitebalance);
|
|
||||||
addPanel (exposurePanel, toneCurve);
|
addPanel (exposurePanel, toneCurve);
|
||||||
toolPanels.push_back (toneCurve);
|
|
||||||
addPanel (colorPanel, vibrance);
|
addPanel (colorPanel, vibrance);
|
||||||
toolPanels.push_back (vibrance);
|
|
||||||
addPanel (colorPanel, chmixer);
|
addPanel (colorPanel, chmixer);
|
||||||
toolPanels.push_back (chmixer); // << TODO: Add "Enabled"
|
|
||||||
addPanel (colorPanel, blackwhite);
|
addPanel (colorPanel, blackwhite);
|
||||||
toolPanels.push_back (blackwhite);
|
|
||||||
addPanel (exposurePanel, shadowshighlights);
|
addPanel (exposurePanel, shadowshighlights);
|
||||||
toolPanels.push_back (shadowshighlights);
|
|
||||||
addPanel (detailsPanel, sharpening);
|
addPanel (detailsPanel, sharpening);
|
||||||
toolPanels.push_back (sharpening);
|
|
||||||
addPanel (detailsPanel, sharpenEdge);
|
addPanel (detailsPanel, sharpenEdge);
|
||||||
toolPanels.push_back (sharpenEdge);
|
|
||||||
addPanel (detailsPanel, sharpenMicro);
|
addPanel (detailsPanel, sharpenMicro);
|
||||||
toolPanels.push_back (sharpenMicro);
|
|
||||||
addPanel (colorPanel, hsvequalizer);
|
addPanel (colorPanel, hsvequalizer);
|
||||||
toolPanels.push_back (hsvequalizer); // << TODO: Add "Enabled"
|
|
||||||
addPanel (colorPanel, filmSimulation);
|
addPanel (colorPanel, filmSimulation);
|
||||||
toolPanels.push_back (filmSimulation);
|
|
||||||
addPanel (colorPanel, rgbcurves);
|
addPanel (colorPanel, rgbcurves);
|
||||||
toolPanels.push_back (rgbcurves); // << TODO: Add "Enabled"
|
|
||||||
addPanel (colorPanel, colortoning);
|
addPanel (colorPanel, colortoning);
|
||||||
toolPanels.push_back (colortoning);
|
|
||||||
addPanel (exposurePanel, epd);
|
addPanel (exposurePanel, epd);
|
||||||
toolPanels.push_back (epd);
|
|
||||||
addPanel (exposurePanel, retinex);
|
addPanel (exposurePanel, retinex);
|
||||||
toolPanels.push_back (retinex);
|
|
||||||
addPanel (exposurePanel, pcvignette);
|
addPanel (exposurePanel, pcvignette);
|
||||||
toolPanels.push_back (pcvignette);
|
|
||||||
addPanel (exposurePanel, gradient);
|
addPanel (exposurePanel, gradient);
|
||||||
toolPanels.push_back (gradient);
|
|
||||||
addPanel (exposurePanel, lcurve);
|
addPanel (exposurePanel, lcurve);
|
||||||
toolPanels.push_back (lcurve); // << TODO: Add "Enabled" ???
|
|
||||||
addPanel (exposurePanel, colorappearance);
|
addPanel (exposurePanel, colorappearance);
|
||||||
toolPanels.push_back (colorappearance);
|
|
||||||
addPanel (detailsPanel, impulsedenoise);
|
addPanel (detailsPanel, impulsedenoise);
|
||||||
toolPanels.push_back (impulsedenoise);
|
|
||||||
addPanel (detailsPanel, dirpyrdenoise);
|
addPanel (detailsPanel, dirpyrdenoise);
|
||||||
toolPanels.push_back (dirpyrdenoise);
|
|
||||||
addPanel (detailsPanel, defringe);
|
addPanel (detailsPanel, defringe);
|
||||||
toolPanels.push_back (defringe);
|
|
||||||
addPanel (detailsPanel, dirpyrequalizer);
|
addPanel (detailsPanel, dirpyrequalizer);
|
||||||
toolPanels.push_back (dirpyrequalizer);
|
|
||||||
addPanel (waveletPanel, wavelet);
|
addPanel (waveletPanel, wavelet);
|
||||||
toolPanels.push_back (wavelet);
|
|
||||||
addPanel (transformPanel, crop);
|
addPanel (transformPanel, crop);
|
||||||
toolPanels.push_back (crop);
|
|
||||||
addPanel (transformPanel, resize);
|
addPanel (transformPanel, resize);
|
||||||
toolPanels.push_back (resize);
|
|
||||||
addPanel (resize->getPackBox(), prsharpening, 2);
|
addPanel (resize->getPackBox(), prsharpening, 2);
|
||||||
toolPanels.push_back (prsharpening);
|
|
||||||
addPanel (transformPanel, lensgeom);
|
addPanel (transformPanel, lensgeom);
|
||||||
toolPanels.push_back (lensgeom);
|
|
||||||
addPanel (lensgeom->getPackBox(), rotate, 2);
|
addPanel (lensgeom->getPackBox(), rotate, 2);
|
||||||
toolPanels.push_back (rotate);
|
|
||||||
addPanel (lensgeom->getPackBox(), perspective, 2);
|
addPanel (lensgeom->getPackBox(), perspective, 2);
|
||||||
toolPanels.push_back (perspective);
|
|
||||||
addPanel (lensgeom->getPackBox(), lensProf, 2);
|
addPanel (lensgeom->getPackBox(), lensProf, 2);
|
||||||
toolPanels.push_back (lensProf);
|
|
||||||
addPanel (lensgeom->getPackBox(), distortion, 2);
|
addPanel (lensgeom->getPackBox(), distortion, 2);
|
||||||
toolPanels.push_back (distortion);
|
|
||||||
addPanel (lensgeom->getPackBox(), cacorrection, 2);
|
addPanel (lensgeom->getPackBox(), cacorrection, 2);
|
||||||
toolPanels.push_back (cacorrection);
|
|
||||||
addPanel (lensgeom->getPackBox(), vignetting, 2);
|
addPanel (lensgeom->getPackBox(), vignetting, 2);
|
||||||
toolPanels.push_back (vignetting);
|
|
||||||
addPanel (colorPanel, icm);
|
addPanel (colorPanel, icm);
|
||||||
toolPanels.push_back (icm);
|
|
||||||
addPanel (rawPanel, sensorbayer);
|
addPanel (rawPanel, sensorbayer);
|
||||||
toolPanels.push_back (sensorbayer);
|
|
||||||
addPanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
addPanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
||||||
toolPanels.push_back (bayerprocess);
|
|
||||||
addPanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
addPanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
||||||
toolPanels.push_back (bayerrawexposure);
|
|
||||||
addPanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
addPanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
||||||
toolPanels.push_back (bayerpreprocess);
|
|
||||||
addPanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
addPanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
||||||
toolPanels.push_back (rawcacorrection);
|
|
||||||
addPanel (rawPanel, sensorxtrans);
|
addPanel (rawPanel, sensorxtrans);
|
||||||
toolPanels.push_back (sensorxtrans);
|
|
||||||
addPanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
addPanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
||||||
toolPanels.push_back (xtransprocess);
|
|
||||||
addPanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
addPanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
||||||
toolPanels.push_back (xtransrawexposure);
|
|
||||||
addPanel (rawPanel, rawexposure);
|
addPanel (rawPanel, rawexposure);
|
||||||
toolPanels.push_back (rawexposure);
|
|
||||||
addPanel (rawPanel, preprocess);
|
addPanel (rawPanel, preprocess);
|
||||||
toolPanels.push_back (preprocess);
|
|
||||||
addPanel (rawPanel, darkframe);
|
addPanel (rawPanel, darkframe);
|
||||||
toolPanels.push_back (darkframe);
|
|
||||||
addPanel (rawPanel, flatfield);
|
addPanel (rawPanel, flatfield);
|
||||||
toolPanels.push_back (flatfield);
|
|
||||||
|
|
||||||
toolPanels.push_back (coarse);
|
toolPanels.push_back (coarse);
|
||||||
toolPanels.push_back (exifpanel);
|
|
||||||
toolPanels.push_back (iptcpanel);
|
|
||||||
|
|
||||||
metadataPanel = Gtk::manage (new Gtk::Notebook ());
|
if(!batch) {
|
||||||
metadataPanel->set_name ("MetaPanelNotebook");
|
toolPanels.push_back (exifpanel);
|
||||||
|
toolPanels.push_back (iptcpanel);
|
||||||
|
metadataPanel = Gtk::manage (new Gtk::Notebook ());
|
||||||
|
metadataPanel->set_name ("MetaPanelNotebook");
|
||||||
|
metadataPanel->append_page (*exifpanel, M ("MAIN_TAB_EXIF"));
|
||||||
|
metadataPanel->append_page (*iptcpanel, M ("MAIN_TAB_IPTC"));
|
||||||
|
} else {
|
||||||
|
metadataPanel = nullptr;
|
||||||
|
}
|
||||||
toolPanelNotebook = new Gtk::Notebook ();
|
toolPanelNotebook = new Gtk::Notebook ();
|
||||||
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
||||||
|
|
||||||
metadataPanel->append_page (*exifpanel, M ("MAIN_TAB_EXIF"));
|
|
||||||
metadataPanel->append_page (*iptcpanel, M ("MAIN_TAB_IPTC"));
|
|
||||||
|
|
||||||
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||||
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||||
@@ -256,7 +215,11 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false
|
|||||||
toiW = Gtk::manage (new TextOrIcon ("wavelet.png", M ("MAIN_TAB_WAVELET"), M ("MAIN_TAB_WAVELET_TOOLTIP"), type));
|
toiW = Gtk::manage (new TextOrIcon ("wavelet.png", M ("MAIN_TAB_WAVELET"), M ("MAIN_TAB_WAVELET_TOOLTIP"), type));
|
||||||
toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP"), type));
|
toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP"), type));
|
||||||
toiR = Gtk::manage (new TextOrIcon ("raw.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP"), type));
|
toiR = Gtk::manage (new TextOrIcon ("raw.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP"), type));
|
||||||
toiM = Gtk::manage (new TextOrIcon ("meta.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP"), type));
|
if(!batch) {
|
||||||
|
toiM = Gtk::manage (new TextOrIcon ("meta.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP"), type));
|
||||||
|
} else {
|
||||||
|
toiM = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
||||||
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
||||||
@@ -264,7 +227,9 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false
|
|||||||
toolPanelNotebook->append_page (*waveletPanelSW, *toiW);
|
toolPanelNotebook->append_page (*waveletPanelSW, *toiW);
|
||||||
toolPanelNotebook->append_page (*transformPanelSW, *toiT);
|
toolPanelNotebook->append_page (*transformPanelSW, *toiT);
|
||||||
toolPanelNotebook->append_page (*rawPanelSW, *toiR);
|
toolPanelNotebook->append_page (*rawPanelSW, *toiR);
|
||||||
toolPanelNotebook->append_page (*metadataPanel, *toiM);
|
if(!batch) {
|
||||||
|
toolPanelNotebook->append_page (*metadataPanel, *toiM);
|
||||||
|
}
|
||||||
|
|
||||||
toolPanelNotebook->set_current_page (0);
|
toolPanelNotebook->set_current_page (0);
|
||||||
|
|
||||||
@@ -297,6 +262,7 @@ void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel,
|
|||||||
|
|
||||||
expList.push_back (panel->getExpander());
|
expList.push_back (panel->getExpander());
|
||||||
where->pack_start (*panel->getExpander(), false, false);
|
where->pack_start (*panel->getExpander(), false, false);
|
||||||
|
toolPanels.push_back (panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolPanelCoordinator::~ToolPanelCoordinator ()
|
ToolPanelCoordinator::~ToolPanelCoordinator ()
|
||||||
|
@@ -198,7 +198,7 @@ public:
|
|||||||
CoarsePanel* coarse;
|
CoarsePanel* coarse;
|
||||||
Gtk::Notebook* toolPanelNotebook;
|
Gtk::Notebook* toolPanelNotebook;
|
||||||
|
|
||||||
ToolPanelCoordinator ();
|
ToolPanelCoordinator (bool batch = false);
|
||||||
virtual ~ToolPanelCoordinator ();
|
virtual ~ToolPanelCoordinator ();
|
||||||
|
|
||||||
bool getChangedState ()
|
bool getChangedState ()
|
||||||
|
Reference in New Issue
Block a user