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:
@@ -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 (¶ms, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited);
|
||||
}
|
||||
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
|
||||
|
Reference in New Issue
Block a user