commit ec2b5a358789599f440ad73e07f70a0b3ee1e159
Author: Koji Yokota <[email protected]>
Date: Tue Mar 11 21:38:14 2025 +0900
Use wait cursor for time-consuming resetAllColor()
---
src/frontends/qt/GuiPrefs.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 75a2b894b8..fce0136437 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1247,12 +1247,14 @@ void PrefColors::resetColor()
void PrefColors::resetAllColor()
{
+ guiApp->setOverrideCursor(QCursor(Qt::WaitCursor));
+
bool isChanged = false;
colorResetAllPB->setDisabled(true);
for (int irow = 0, count = colorsTW->rowCount(); irow < count; ++irow) {
- ColorNamePair const colors = newcolors_[size_t(irow)];
+ ColorNamePair const & colors = newcolors_[size_t(irow)];
ColorPair const c = getDefaultColorsByRow(irow);
if (setColor(irow, c, colors))
@@ -1267,6 +1269,8 @@ void PrefColors::resetAllColor()
// updateAllIcons is not sufficient
redrawColorTable();
+
+ guiApp->restoreOverrideCursor();
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs