14.13 round 1: the name label hides while its field shows

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 07:23:31 -04:00
1 parent 022e0d0524
commit fb4eb57d32
3 files changed
+14 -1

No files matched your search

+3
View File
@@ -293,6 +293,8 @@ void LayerCell::beginRenaming()
editing.setColor(QPalette::Base, tint);
m_editor->setPalette(editing);
m_editor->setText(m_layerName);
// Swift edits the label itself: no second name beneath.
m_name->hide();
m_editor->show();
m_editor->setFocus(Qt::OtherFocusReason);
m_editor->selectAll();
@@ -306,6 +308,7 @@ void LayerCell::endRenaming(bool keeping)
const QString typed = m_editor->text();
m_renaming = false;
m_editor->hide();
m_name->show();
// Cleared first: the rename's signal would reopen the editor.
if (session.renamingLayerID() == m_layerID)
session.setRenamingLayerID(std::nullopt);