Closing the picker gives open text the keys back; colour edits wait for text editing (12.14d2)
This commit is contained in:
1 parent
27a4fe8428
commit
aa5a44e517
10 files changed
+217
-10
No files matched your search
@@ -257,6 +257,9 @@ void EditorSession::closeColorPicker(bool commit)
|
||||
const PaletteColor chosen = commit ? color : picker.original;
|
||||
changeEffects([&](LayerEffects &effects) { effects.setColor(chosen, picker.target.effect); });
|
||||
}
|
||||
// Sampling took the keys from open text: they go back.
|
||||
if (m_textDraft)
|
||||
++m_canvasFocusRequest;
|
||||
notify();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ bool EditorSession::canAdjust(bool allowingEmpty) const
|
||||
{
|
||||
const std::optional<ImageLayer> layer = activeLayer();
|
||||
const std::optional<DocumentSelection> current = selection();
|
||||
return !m_levels && !m_filterEdit && m_document && layer && !m_isProjectBusy && !m_isImporting && !m_brushStroke && !m_pixelMove && !m_renamingLayerID && !m_showsNewDocument
|
||||
// Open text is drawn by its editor: previews would lie.
|
||||
return !m_levels && !m_filterEdit && !m_textDraft && m_document && layer && !m_isProjectBusy && !m_isImporting && !m_brushStroke && !m_pixelMove && !m_renamingLayerID && !m_showsNewDocument
|
||||
&& !m_showsImporter && m_selectedLayerIDs.size() == 1 && !layer->isGroup && !m_isMaskSelected && (layer->asset || allowingEmpty)
|
||||
&& m_document->effectiveVisibleIDs().contains(layer->id) && !(current && current->isEmpty());
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void EditorSession::deleteLayerOrMask()
|
||||
bool EditorSession::canInvert() const
|
||||
{
|
||||
const std::optional<ImageLayer> layer = activeLayer();
|
||||
if (!m_document || !layer || m_isProjectBusy || m_isImporting || m_brushStroke || m_pixelMove || m_renamingLayerID || m_showsNewDocument || m_showsImporter
|
||||
if (!m_document || m_textDraft || !layer || m_isProjectBusy || m_isImporting || m_brushStroke || m_pixelMove || m_renamingLayerID || m_showsNewDocument || m_showsImporter
|
||||
|| m_selectedLayerIDs.size() != 1 || (layer->isGroup && !m_isMaskSelected) || !m_document->effectiveVisibleIDs().contains(layer->id))
|
||||
return false;
|
||||
const std::optional<DocumentSelection> current = selection();
|
||||
|
||||
Reference in new issue
Block a user