BugFix: prevent View Terminate if not previously Initiated

Ensures Action::Manager stores terminated actions only if previously initiated (caused iterative action storing on keyboard repeat).
This commit is contained in:
Bruno Herbelin
2022-04-20 16:43:42 +02:00
parent d41a85f4a1
commit c8f8fcf9d3
9 changed files with 74 additions and 66 deletions

View File

@@ -1320,7 +1320,7 @@ void TextureView::initiate()
stored_mask_size_ = glm::vec3(0.f);
}
void TextureView::terminate()
void TextureView::terminate(bool force)
{
// special case for texture paint: store image on mouse release (end of action PAINT)
if ( edit_source_ != nullptr && current_action_.find(MASK_PAINT_ACTION_LABEL) != std::string::npos ) {
@@ -1329,7 +1329,7 @@ void TextureView::terminate()
}
// View default termination of action
View::terminate();
View::terminate(force);
// hide all overlays
overlay_position_->visible_ = false;