mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00
Have Print::apply_config() return true if any step was invalidated
This commit is contained in:
parent
5e80d7a388
commit
97231327e0
4 changed files with 23 additions and 9 deletions
|
@ -40,11 +40,13 @@ PrintState<StepClass>::invalidate(StepClass step)
|
|||
}
|
||||
|
||||
template <class StepClass>
|
||||
void
|
||||
bool
|
||||
PrintState<StepClass>::invalidate_all()
|
||||
{
|
||||
bool empty = this->_started.empty();
|
||||
this->_started.clear();
|
||||
this->_done.clear();
|
||||
return !empty; // return true if we invalidated something
|
||||
}
|
||||
|
||||
template class PrintState<PrintStep>;
|
||||
|
|
|
@ -36,7 +36,7 @@ class PrintState
|
|||
void set_started(StepType step);
|
||||
void set_done(StepType step);
|
||||
void invalidate(StepType step);
|
||||
void invalidate_all();
|
||||
bool invalidate_all();
|
||||
};
|
||||
|
||||
// A PrintRegion object represents a group of volumes to print
|
||||
|
|
|
@ -87,8 +87,8 @@ _constant()
|
|||
|
||||
bool invalidate_state_by_config_options(std::vector<std::string> opt_keys);
|
||||
void invalidate_step(PrintObjectStep step);
|
||||
void invalidate_all_steps()
|
||||
%code%{ THIS->state.invalidate_all(); %};
|
||||
bool invalidate_all_steps()
|
||||
%code%{ RETVAL = THIS->state.invalidate_all(); %};
|
||||
bool step_done(PrintObjectStep step)
|
||||
%code%{ RETVAL = THIS->state.done(step); %};
|
||||
void set_step_done(PrintObjectStep step)
|
||||
|
@ -142,8 +142,8 @@ _constant()
|
|||
|
||||
bool invalidate_state_by_config_options(std::vector<std::string> opt_keys);
|
||||
void invalidate_step(PrintStep step);
|
||||
void invalidate_all_steps()
|
||||
%code%{ THIS->state.invalidate_all(); %};
|
||||
bool invalidate_all_steps()
|
||||
%code%{ RETVAL = THIS->state.invalidate_all(); %};
|
||||
bool step_done(PrintStep step)
|
||||
%code%{ RETVAL = THIS->state.done(step); %};
|
||||
void set_step_done(PrintStep step)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue