commit 565756e2d6e9ddae625d7728967cb0c51c542001
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Feb 21 16:22:38 2025 +0100
Auto-open color dialog when new custom color is added
---
src/frontends/qt/GuiDocument.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 04862a6615..f20caa795c 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -5745,6 +5745,16 @@ void GuiDocument::addCustomColor()
custom_colors_[new_color] = toqstr("#ffbfbf");
colorModule->newColorLE->clear();
updateCustomColors();
+ // select new color
+ QList<QTreeWidgetItem *> twis =
+
colorModule->customColorsTW->findItems(new_color, Qt::MatchExactly);
+ if (!twis.empty()) {
+ QTreeWidgetItem * item = twis.first();
+ colorModule->customColorsTW->setCurrentItem(item);
+ item->setSelected(true);
+ }
+ // and open color dialog
+ alterCustomColor();
}
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs