Enhancement: Before/After lock-unlock (see issue 1017)
Lock: keep the Before view unchanged - useful to evaluate the cumulative effect of multiple tools. Additionally, comparison can be made to any state in the History Unlock: the Before view will follow the After view 1 step behind, showing image before the effect of the currently used tool
This commit is contained in:
BIN
rtdata/images/lock_off.png
Normal file
BIN
rtdata/images/lock_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
BIN
rtdata/images/lock_on.png
Normal file
BIN
rtdata/images/lock_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
@@ -459,6 +459,7 @@ MAIN_TOOLTIP_HIDEFP;Show/hide the bottom panel (directory and file browser) <b>F
|
|||||||
MAIN_TOOLTIP_HIDEHP;Show/hide the left panel (including the history) <b>l</b>
|
MAIN_TOOLTIP_HIDEHP;Show/hide the left panel (including the history) <b>l</b>
|
||||||
MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication (Key <)
|
MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication (Key <)
|
||||||
MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication (Key >)
|
MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication (Key >)
|
||||||
|
MAIN_TOOLTIP_BEFOREAFTERLOCK;<b>Lock</b> / <b>Unlock</b> the <b>Before</b> view\n\n<b>Lock</b>: keep the <b>Before</b> view unchanged - \nuseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparison can be made to any state in the History\n\n<b>Unlock</b>: the <b>Before</b> view will follow the <b>After</b> view 1 step behind, showing image before the effect of the currently used tool
|
||||||
MAIN_TOOLTIP_PREFERENCES;Set preferences
|
MAIN_TOOLTIP_PREFERENCES;Set preferences
|
||||||
MAIN_TOOLTIP_QINFO;Quick info on the image <b>I</b>
|
MAIN_TOOLTIP_QINFO;Quick info on the image <b>I</b>
|
||||||
MAIN_TOOLTIP_SAVEAS;Save image to a selected folder
|
MAIN_TOOLTIP_SAVEAS;Save image to a selected folder
|
||||||
|
@@ -82,6 +82,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
|||||||
beforeAfter->set_relief(Gtk::RELIEF_NONE);
|
beforeAfter->set_relief(Gtk::RELIEF_NONE);
|
||||||
beforeAfter->set_tooltip_markup (M("MAIN_TOOLTIP_TOGGLE"));
|
beforeAfter->set_tooltip_markup (M("MAIN_TOOLTIP_TOGGLE"));
|
||||||
|
|
||||||
|
iBeforeLockON = new Gtk::Image(argv0+"/images/lock_on.png");
|
||||||
|
iBeforeLockOFF = new Gtk::Image(argv0+"/images/lock_off.png");
|
||||||
|
|
||||||
Gtk::VSeparator* vsept = Gtk::manage (new Gtk::VSeparator ());
|
Gtk::VSeparator* vsept = Gtk::manage (new Gtk::VSeparator ());
|
||||||
Gtk::VSeparator* vsepz = Gtk::manage (new Gtk::VSeparator ());
|
Gtk::VSeparator* vsepz = Gtk::manage (new Gtk::VSeparator ());
|
||||||
@@ -1221,7 +1223,7 @@ void EditorPanel::beforeAfterToggled () {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
removeIfThere (beforeAfterBox, beforeBox, false);
|
removeIfThere (beforeAfterBox, beforeBox, false);
|
||||||
removeIfThere (afterBox, afterLabel, false);
|
removeIfThere (afterBox, afterHeaderBox, false);
|
||||||
|
|
||||||
if (beforeIarea) {
|
if (beforeIarea) {
|
||||||
if (beforeIpc)
|
if (beforeIpc)
|
||||||
@@ -1246,16 +1248,32 @@ void EditorPanel::beforeAfterToggled () {
|
|||||||
|
|
||||||
beforeIarea = new ImageAreaPanel ();
|
beforeIarea = new ImageAreaPanel ();
|
||||||
|
|
||||||
|
int HeaderBoxHeight = 15;
|
||||||
|
|
||||||
beforeLabel = Gtk::manage (new Gtk::Label ());
|
beforeLabel = Gtk::manage (new Gtk::Label ());
|
||||||
beforeLabel->set_markup (Glib::ustring("<b>") + M("GENERAL_BEFORE") + "</b>");
|
beforeLabel->set_markup (Glib::ustring("<b>") + M("GENERAL_BEFORE") + "</b>");
|
||||||
|
tbBeforeLock = Gtk::manage (new Gtk::ToggleButton ());
|
||||||
|
tbBeforeLock->set_tooltip_markup (M("MAIN_TOOLTIP_BEFOREAFTERLOCK"));
|
||||||
|
tbBeforeLock->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::tbBeforeLock_toggled) );
|
||||||
|
beforeHeaderBox = Gtk::manage (new Gtk::HBox ());
|
||||||
|
beforeHeaderBox->pack_end (*tbBeforeLock, Gtk::PACK_SHRINK, 2);
|
||||||
|
beforeHeaderBox->pack_end (*beforeLabel, Gtk::PACK_SHRINK, 2);
|
||||||
|
beforeHeaderBox->set_size_request(0, HeaderBoxHeight);
|
||||||
|
|
||||||
|
history->blistenerLock ? tbBeforeLock->set_image (*iBeforeLockON):tbBeforeLock->set_image (*iBeforeLockOFF);
|
||||||
|
tbBeforeLock->set_active(history->blistenerLock);
|
||||||
|
|
||||||
beforeBox = Gtk::manage (new Gtk::VBox ());
|
beforeBox = Gtk::manage (new Gtk::VBox ());
|
||||||
beforeBox->pack_start (*beforeLabel, Gtk::PACK_SHRINK, 2);
|
beforeBox->pack_start (*beforeHeaderBox, Gtk::PACK_SHRINK, 2);
|
||||||
beforeBox->pack_start (*beforeIarea);
|
beforeBox->pack_start (*beforeIarea);
|
||||||
|
|
||||||
afterLabel = Gtk::manage (new Gtk::Label ());
|
afterLabel = Gtk::manage (new Gtk::Label ());
|
||||||
afterLabel->set_markup (Glib::ustring("<b>") + M("GENERAL_AFTER") + "</b>");
|
afterLabel->set_markup (Glib::ustring("<b>") + M("GENERAL_AFTER") + "</b>");
|
||||||
afterBox->pack_start (*afterLabel, Gtk::PACK_SHRINK, 2);
|
afterHeaderBox = Gtk::manage (new Gtk::HBox ());
|
||||||
afterBox->reorder_child (*afterLabel, 0);
|
afterHeaderBox->set_size_request(0, HeaderBoxHeight);
|
||||||
|
afterHeaderBox->pack_end (*afterLabel, Gtk::PACK_SHRINK, 2);
|
||||||
|
afterBox->pack_start (*afterHeaderBox, Gtk::PACK_SHRINK, 2);
|
||||||
|
afterBox->reorder_child (*afterHeaderBox, 0);
|
||||||
|
|
||||||
beforeAfterBox->pack_start (*beforeBox);
|
beforeAfterBox->pack_start (*beforeBox);
|
||||||
beforeAfterBox->reorder_child (*beforeBox, 0);
|
beforeAfterBox->reorder_child (*beforeBox, 0);
|
||||||
@@ -1278,6 +1296,11 @@ void EditorPanel::beforeAfterToggled () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditorPanel::tbBeforeLock_toggled () {
|
||||||
|
history->blistenerLock = tbBeforeLock->get_active();
|
||||||
|
tbBeforeLock->get_active()? tbBeforeLock->set_image (*iBeforeLockON) : tbBeforeLock->set_image (*iBeforeLockOFF);
|
||||||
|
}
|
||||||
|
|
||||||
void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve,
|
void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve,
|
||||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) {
|
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) {
|
||||||
|
|
||||||
|
@@ -57,6 +57,7 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
Gtk::ToggleButton* tbShowHideSidePanels;
|
Gtk::ToggleButton* tbShowHideSidePanels;
|
||||||
Gtk::ToggleButton* tbTopPanel_1;
|
Gtk::ToggleButton* tbTopPanel_1;
|
||||||
Gtk::ToggleButton* tbRightPanel_1;
|
Gtk::ToggleButton* tbRightPanel_1;
|
||||||
|
Gtk::ToggleButton* tbBeforeLock;
|
||||||
bool tbTopPanel_1_Active;
|
bool tbTopPanel_1_Active;
|
||||||
bool tbRightPanel_1_Active;
|
bool tbRightPanel_1_Active;
|
||||||
//bool bAllSidePanelsVisible;
|
//bool bAllSidePanelsVisible;
|
||||||
@@ -68,6 +69,7 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
Gtk::Image *iTopPanel_1_Show, *iTopPanel_1_Hide;
|
Gtk::Image *iTopPanel_1_Show, *iTopPanel_1_Hide;
|
||||||
Gtk::Image *iRightPanel_1_Show, *iRightPanel_1_Hide;
|
Gtk::Image *iRightPanel_1_Show, *iRightPanel_1_Hide;
|
||||||
Gtk::Image *iShowHideSidePanels;
|
Gtk::Image *iShowHideSidePanels;
|
||||||
|
Gtk::Image *iBeforeLockON, *iBeforeLockOFF;
|
||||||
Gtk::VBox *leftbox;
|
Gtk::VBox *leftbox;
|
||||||
Gtk::VBox *vboxright;
|
Gtk::VBox *vboxright;
|
||||||
|
|
||||||
@@ -85,6 +87,8 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
Gtk::Label* beforeLabel;
|
Gtk::Label* beforeLabel;
|
||||||
Gtk::Label* afterLabel;
|
Gtk::Label* afterLabel;
|
||||||
Gtk::HBox* beforeAfterBox;
|
Gtk::HBox* beforeAfterBox;
|
||||||
|
Gtk::HBox* beforeHeaderBox;
|
||||||
|
Gtk::HBox* afterHeaderBox;
|
||||||
|
|
||||||
Gtk::Frame* ppframe;
|
Gtk::Frame* ppframe;
|
||||||
ProfilePanel* profilep;
|
ProfilePanel* profilep;
|
||||||
@@ -163,6 +167,7 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
void tbRightPanel_1_toggled ();
|
void tbRightPanel_1_toggled ();
|
||||||
void tbTopPanel_1_toggled ();
|
void tbTopPanel_1_toggled ();
|
||||||
void beforeAfterToggled ();
|
void beforeAfterToggled ();
|
||||||
|
void tbBeforeLock_toggled();
|
||||||
void saveAsPressed ();
|
void saveAsPressed ();
|
||||||
void queueImgPressed ();
|
void queueImgPressed ();
|
||||||
void sendToGimpPressed ();
|
void sendToGimpPressed ();
|
||||||
|
@@ -27,6 +27,8 @@ extern Glib::ustring argv0;
|
|||||||
|
|
||||||
History::History (bool bookmarkSupport) : blistener(NULL), tpc (NULL), bmnum (1) {
|
History::History (bool bookmarkSupport) : blistener(NULL), tpc (NULL), bmnum (1) {
|
||||||
|
|
||||||
|
blistenerLock = false; // sets default that the Before preview will not be locked
|
||||||
|
|
||||||
// fill history event message array
|
// fill history event message array
|
||||||
for (int i=0; i<NUMOFEVENTS; i++)
|
for (int i=0; i<NUMOFEVENTS; i++)
|
||||||
eventDescrArray[i] = M(Glib::ustring::compose("HISTORY_MSG_%1", i+1));
|
eventDescrArray[i] = M(Glib::ustring::compose("HISTORY_MSG_%1", i+1));
|
||||||
@@ -145,7 +147,7 @@ void History::historySelectionChanged () {
|
|||||||
ParamsEdited paramsEdited = row[historyColumns.paramsEdited];
|
ParamsEdited paramsEdited = row[historyColumns.paramsEdited];
|
||||||
tpc->profileChange (¶ms, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited);
|
tpc->profileChange (¶ms, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited);
|
||||||
}
|
}
|
||||||
if (blistener) {
|
if (blistener && blistenerLock==false) {
|
||||||
Gtk::TreeModel::Path path = historyModel->get_path (iter);
|
Gtk::TreeModel::Path path = historyModel->get_path (iter);
|
||||||
path.prev ();
|
path.prev ();
|
||||||
iter = historyModel->get_iter (path);
|
iter = historyModel->get_iter (path);
|
||||||
@@ -208,9 +210,9 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring
|
|||||||
newrow[historyColumns.paramsEdited] = paramsEdited ? *paramsEdited : defParamsEdited;
|
newrow[historyColumns.paramsEdited] = paramsEdited ? *paramsEdited : defParamsEdited;
|
||||||
if (ev!=EvBookmarkSelected)
|
if (ev!=EvBookmarkSelected)
|
||||||
selection->select (newrow);
|
selection->select (newrow);
|
||||||
if (blistener && row)
|
if (blistener && row && blistenerLock==false)
|
||||||
blistener->historyBeforeLineChanged (row[historyColumns.params]);
|
blistener->historyBeforeLineChanged (row[historyColumns.params]);
|
||||||
else if (blistener && size==0)
|
else if (blistener && size==0 && blistenerLock==false)
|
||||||
blistener->historyBeforeLineChanged (newrow[historyColumns.params]);
|
blistener->historyBeforeLineChanged (newrow[historyColumns.params]);
|
||||||
}
|
}
|
||||||
// else just update it
|
// else just update it
|
||||||
|
@@ -100,6 +100,8 @@ class History : public Gtk::VBox, public PParamsChangeListener {
|
|||||||
|
|
||||||
void undo ();
|
void undo ();
|
||||||
void redo ();
|
void redo ();
|
||||||
|
|
||||||
|
bool blistenerLock;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user