- _position_lock_style = other->_position_lock_style;
- _first_edit = other->_first_edit;
-
- if (offset == 0) {
-
- _start = 0;
-
- /* sync pos is relative to start of file. our start-in-file is now zero,
- so set our sync position to whatever the the difference between
- _start and _sync_pos was in the other region.
-
- result is that our new sync pos points to the same point in our source(s)
- as the sync in the other region did in its source(s).
-
- since we start at zero in our source(s), it is not possible to use a sync point that
- is before the start. reset it to _start if that was true in the other region.
- */
-
- if (other->sync_marked()) {
- if (other->_start < other->_sync_position) {
- /* sync pos was after the start point of the other region */
- _sync_position = other->_sync_position - other->_start;
- } else {
- /* sync pos was before the start point of the other region. not possible here. */
- _sync_marked = false;
- _sync_position = _start;
- }
- } else {
- _sync_marked = false;
- _sync_position = _start;
- }
- } else {
- /* XXX do something else ! */
- fatal << string_compose (_("programming error: %1"), X_("Region+offset constructor used with illegal combination of offset+relative"))
- << endmsg;
- /*NOTREACHED*/
- }
+ /* sync pos is relative to start of file. our start-in-file is now zero,
+ so set our sync position to whatever the the difference between
+ _start and _sync_pos was in the other region.