Fix autocreation preferences turning on accidentally (#397)

This commit is contained in:
manongjohn 2020-10-21 11:01:04 -04:00 committed by GitHub
parent 64f86e6392
commit 6603af6b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2641,6 +2641,11 @@ void TCellSelection::createBlankDrawing(int row, int col, bool multiple) {
}
if (!toolHandle->getTool()->m_isFrameCreated) {
if (!isAutoCreateEnabled)
Preferences::instance()->setValue(EnableAutocreation, false, false);
if (!isCreationInHoldCellsEnabled)
Preferences::instance()->setValue(EnableCreationInHoldCells, false,
false);
if (!multiple)
DVGui::warning(QObject::tr(
"Unable to replace the current drawing with a blank drawing"));
@ -2784,6 +2789,11 @@ void TCellSelection::duplicateFrame(int row, int col, bool multiple) {
bool frameCreated = toolHandle->getTool()->m_isFrameCreated;
if (!frameCreated) {
if (!isAutoCreateEnabled)
Preferences::instance()->setValue(EnableAutocreation, false, false);
if (!isCreationInHoldCellsEnabled)
Preferences::instance()->setValue(EnableCreationInHoldCells, false,
false);
if (!multiple)
DVGui::warning(
QObject::tr("Unable to replace the current or next drawing with a "