mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 11:47:54 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
39
src/slic3r/GUI/ProjectDirtyStateManager.hpp
Normal file
39
src/slic3r/GUI/ProjectDirtyStateManager.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef slic3r_ProjectDirtyStateManager_hpp_
|
||||
#define slic3r_ProjectDirtyStateManager_hpp_
|
||||
|
||||
#include "libslic3r/Preset.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
class ProjectDirtyStateManager
|
||||
{
|
||||
public:
|
||||
void update_from_undo_redo_stack(bool dirty);
|
||||
void update_from_presets();
|
||||
void reset_after_save();
|
||||
void reset_initial_presets();
|
||||
|
||||
bool is_dirty() const { return m_plater_dirty || m_project_config_dirty || m_presets_dirty; }
|
||||
bool is_presets_dirty() const { return m_presets_dirty; }
|
||||
|
||||
#if ENABLE_PROJECT_DIRTY_STATE_DEBUG_WINDOW
|
||||
void render_debug_window() const;
|
||||
#endif // ENABLE_PROJECT_DIRTY_STATE_DEBUG_WINDOW
|
||||
|
||||
private:
|
||||
// Does the Undo / Redo stack indicate the project is dirty?
|
||||
bool m_plater_dirty { false };
|
||||
// Do the presets indicate the project is dirty?
|
||||
bool m_presets_dirty { false };
|
||||
// Is the project config dirty?
|
||||
bool m_project_config_dirty { false };
|
||||
// Keeps track of preset names selected at the time of last project save.
|
||||
std::array<std::string, Preset::TYPE_COUNT> m_initial_presets;
|
||||
DynamicPrintConfig m_initial_project_config;
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // slic3r_ProjectDirtyStateManager_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue