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:
michael
2011-09-26 22:45:00 -04:00
parent 73e8f043ee
commit ea5a0dfb72
7 changed files with 40 additions and 7 deletions

View File

@@ -27,6 +27,8 @@ extern Glib::ustring argv0;
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
for (int i=0; i<NUMOFEVENTS; i++)
eventDescrArray[i] = M(Glib::ustring::compose("HISTORY_MSG_%1", i+1));
@@ -145,7 +147,7 @@ void History::historySelectionChanged () {
ParamsEdited paramsEdited = row[historyColumns.paramsEdited];
tpc->profileChange (&params, EvHistoryBrowsed, row[historyColumns.text], &paramsEdited);
}
if (blistener) {
if (blistener && blistenerLock==false) {
Gtk::TreeModel::Path path = historyModel->get_path (iter);
path.prev ();
iter = historyModel->get_iter (path);
@@ -208,9 +210,9 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring
newrow[historyColumns.paramsEdited] = paramsEdited ? *paramsEdited : defParamsEdited;
if (ev!=EvBookmarkSelected)
selection->select (newrow);
if (blistener && row)
if (blistener && row && blistenerLock==false)
blistener->historyBeforeLineChanged (row[historyColumns.params]);
else if (blistener && size==0)
else if (blistener && size==0 && blistenerLock==false)
blistener->historyBeforeLineChanged (newrow[historyColumns.params]);
}
// else just update it