mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-28 11:36:26 -05:00
Add Layout::setClean
This commit is contained in:
@@ -114,6 +114,7 @@ public:
|
||||
void clearBorderCache();
|
||||
void cacheBorder();
|
||||
|
||||
void setClean();
|
||||
bool hasUnsavedChanges() const;
|
||||
|
||||
bool layoutBlockChanged(int i, const Blockdata &cache);
|
||||
|
||||
@@ -437,6 +437,11 @@ QPixmap Layout::getLayoutItemPixmap() {
|
||||
return this->layoutItem ? this->layoutItem->pixmap() : QPixmap();
|
||||
}
|
||||
|
||||
void Layout::setClean() {
|
||||
this->editHistory.setClean();
|
||||
this->hasUnsavedDataChanges = false;
|
||||
}
|
||||
|
||||
bool Layout::hasUnsavedChanges() const {
|
||||
return !this->editHistory.isClean() || this->hasUnsavedDataChanges || !this->newFolderPath.isEmpty();
|
||||
}
|
||||
|
||||
@@ -1288,7 +1288,7 @@ void Project::saveLayout(Layout *layout) {
|
||||
// Update global data structures with current map data.
|
||||
updateLayout(layout);
|
||||
|
||||
layout->editHistory.setClean();
|
||||
layout->setClean();
|
||||
}
|
||||
|
||||
void Project::updateLayout(Layout *layout) {
|
||||
|
||||
Reference in New Issue
Block a user