• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29252 (tree)
Zeit2021-08-28 21:57:17
Autorstefankueng

Log Message

Fix redo: the modified detection has to be reverse of undo, not the same

Ändern Zusammenfassung

Diff

--- trunk/src/Changelog.txt (revision 29251)
+++ trunk/src/Changelog.txt (revision 29252)
@@ -10,6 +10,8 @@
1010 kept in place. (Stefan)
1111 - BUG: TortoiseBlame crashed when searching
1212 upwards from the last line. (Stefan)
13+- BUG: Redo in TMerge failed to mark the document
14+ as modified. (Stefan)
1315
1416 Version 1.14.1
1517 - BUG: TortoiseMerge crashed if configured to
--- trunk/src/TortoiseMerge/Undo.cpp (revision 29251)
+++ trunk/src/TortoiseMerge/Undo.cpp (revision 29252)
@@ -302,7 +302,7 @@
302302 }
303303 if (pLeft)
304304 {
305- bool bModified = (m_originalStateLeft == static_cast<size_t>(-1));
305+ bool bModified = (m_originalStateLeft != static_cast<size_t>(-1));
306306 if (!bModified)
307307 {
308308 std::list<AllViewState>::iterator i = m_redoViewStates.begin();
@@ -309,7 +309,7 @@
309309 std::advance(i, m_originalStateLeft);
310310 for (; i != m_redoViewStates.end(); ++i)
311311 {
312- if (i->left.modifies)
312+ if (!i->left.modifies)
313313 {
314314 bModified = true;
315315 break;
@@ -326,15 +326,19 @@
326326 }
327327 if (pRight)
328328 {
329- bool bModified = (m_originalStateRight == static_cast<size_t>(-1));
329+ bool bModified = (m_originalStateRight != static_cast<size_t>(-1));
330330 if (!bModified)
331331 {
332332 std::list<AllViewState>::iterator i = m_redoViewStates.begin();
333- std::advance(i, m_originalStateRight);
334- // ReSharper disable once CppPossiblyErroneousEmptyStatements
335- for (; i != m_redoViewStates.end() && !i->right.modifies; ++i)
336- ;
337- bModified = i != m_redoViewStates.end();
333+ std::advance(i, m_originalStateBottom);
334+ for (; i != m_redoViewStates.end(); ++i)
335+ {
336+ if (!i->bottom.modifies)
337+ {
338+ bModified = true;
339+ break;
340+ }
341+ }
338342 }
339343 pRight->SetModified(bModified);
340344 pRight->ClearStepModifiedMark();
@@ -346,7 +350,7 @@
346350 }
347351 if (pBottom)
348352 {
349- bool bModified = (m_originalStateBottom == static_cast<size_t>(-1));
353+ bool bModified = (m_originalStateBottom != static_cast<size_t>(-1));
350354 if (!bModified)
351355 {
352356 std::list<AllViewState>::iterator i = m_redoViewStates.begin();
@@ -353,7 +357,7 @@
353357 std::advance(i, m_originalStateBottom);
354358 for (; i != m_redoViewStates.end(); ++i)
355359 {
356- if (i->bottom.modifies)
360+ if (!i->bottom.modifies)
357361 {
358362 bModified = true;
359363 break;
Show on old repository browser