Commit 4f769aa4 authored by Agata Cacko's avatar Agata Cacko

Fix crash on CMYK profiles not updated

Before this commit there was a crash if the default (last used)
color model was not CMYK, but the user wanted to create a CMYK
file. Color profiles didn't get updated, so Krita tried to create
a document with an incompatible color profile which resulted in crash.
This commit ensures the correct color model is used.

BUG:409916
parent 3ffa4bdf
...@@ -151,6 +151,7 @@ const KoColorSpace* KisColorSpaceSelector::currentColorSpace() ...@@ -151,6 +151,7 @@ const KoColorSpace* KisColorSpaceSelector::currentColorSpace()
void KisColorSpaceSelector::setCurrentColorModel(const KoID& id) void KisColorSpaceSelector::setCurrentColorModel(const KoID& id)
{ {
d->colorSpaceSelector->cmbColorModels->setCurrent(id); d->colorSpaceSelector->cmbColorModels->setCurrent(id);
d->previousModel = id;
fillCmbDepths(id); fillCmbDepths(id);
} }
...@@ -236,6 +237,7 @@ void KisColorSpaceSelector::slotOpenAdvancedSelector() ...@@ -236,6 +237,7 @@ void KisColorSpaceSelector::slotOpenAdvancedSelector()
if (result) { if (result) {
if (d->profileValid==true) { if (d->profileValid==true) {
setCurrentColorSpace(m_advancedSelector->currentColorSpace()); setCurrentColorSpace(m_advancedSelector->currentColorSpace());
d->profileSetManually = true;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment