mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 04:40:37 +02:00
add cleanup
This commit is contained in:
@@ -472,26 +472,28 @@ void PaintingArea::updateTools(){
|
|||||||
|
|
||||||
void PaintingArea::historyadd(){
|
void PaintingArea::historyadd(){
|
||||||
|
|
||||||
if (++historyPresent == 100) historyPresent = 0;
|
if (++historyPresent == 100){
|
||||||
historyMaxFuture = historyPresent;
|
historyPresent = 0;
|
||||||
if (historyPresent == historyMaxPast) if (++historyMaxPast == 100) historyMaxPast = 0;
|
|
||||||
history[static_cast<size_t>(historyPresent)] = layerBundle;
|
|
||||||
|
|
||||||
for (unsigned long long i=0;i < layerBundle.size();i++) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
historyMaxFuture = historyPresent;
|
||||||
|
if (historyPresent == historyMaxPast)
|
||||||
|
if (++historyMaxPast == 100)
|
||||||
|
historyMaxPast = 0;
|
||||||
|
history[static_cast<size_t>(historyPresent)] = layerBundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::historyGoBack(){
|
void PaintingArea::historyGoBack(){
|
||||||
if (historyPresent != historyMaxPast){
|
if (historyPresent != historyMaxPast){
|
||||||
if (--historyPresent == -1) historyPresent = 99;
|
if (--historyPresent == -1)
|
||||||
|
historyPresent = 99;
|
||||||
layerBundle = history[static_cast<size_t>(historyPresent)];
|
layerBundle = history[static_cast<size_t>(historyPresent)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::historyGoForward(){
|
void PaintingArea::historyGoForward(){
|
||||||
if (historyPresent != historyMaxFuture){
|
if (historyPresent != historyMaxFuture){
|
||||||
if (++historyPresent == 100) historyPresent = 0;
|
if (++historyPresent == 100)
|
||||||
|
historyPresent = 0;
|
||||||
layerBundle = history[static_cast<size_t>(historyPresent)];
|
layerBundle = history[static_cast<size_t>(historyPresent)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user