diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp index b7d9e07..3398d72 100644 --- a/src/Layer/PaintingArea.cpp +++ b/src/Layer/PaintingArea.cpp @@ -472,26 +472,28 @@ void PaintingArea::updateTools(){ void PaintingArea::historyadd(){ - if (++historyPresent == 100) historyPresent = 0; - historyMaxFuture = historyPresent; - if (historyPresent == historyMaxPast) if (++historyMaxPast == 100) historyMaxPast = 0; - history[static_cast(historyPresent)] = layerBundle; - - for (unsigned long long i=0;i < layerBundle.size();i++) { - + if (++historyPresent == 100){ + historyPresent = 0; } + historyMaxFuture = historyPresent; + if (historyPresent == historyMaxPast) + if (++historyMaxPast == 100) + historyMaxPast = 0; + history[static_cast(historyPresent)] = layerBundle; } void PaintingArea::historyGoBack(){ if (historyPresent != historyMaxPast){ - if (--historyPresent == -1) historyPresent = 99; + if (--historyPresent == -1) + historyPresent = 99; layerBundle = history[static_cast(historyPresent)]; } } void PaintingArea::historyGoForward(){ if (historyPresent != historyMaxFuture){ - if (++historyPresent == 100) historyPresent = 0; + if (++historyPresent == 100) + historyPresent = 0; layerBundle = history[static_cast(historyPresent)]; } }