commit 676ed75685dcc246d36cc9f21f9d9a1d79db7acc Author: Koji Yokota <yok...@lyx.org> Date: Sun Mar 16 01:49:07 2025 +0900
Signal changed to currentItemChanged() in PrefColors --- src/frontends/qt/GuiPrefs.cpp | 15 ++++++++++----- src/frontends/qt/GuiPrefs.h | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index 387e1ada4a..dd62143032 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -1096,8 +1096,10 @@ PrefColors::PrefColors(GuiPreferences * form) this, SLOT(changeSysColor())); connect(themesMenuPB, SIGNAL(clicked()), this, SLOT(openThemeMenu())); - connect(themesLW, SIGNAL(itemClicked(QListWidgetItem*)), - this, SLOT(loadThemeInterface(QListWidgetItem*))); + connect(themesLW, + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, + SLOT(loadThemeInterface(QListWidgetItem*,QListWidgetItem*))); connect(undoColorPB, SIGNAL(clicked()), undo_stack_, SLOT(undo())); } @@ -1469,10 +1471,13 @@ void PrefColors::importThemeInterface() } -void PrefColors::loadThemeInterface(QListWidgetItem* item) +void PrefColors::loadThemeInterface(QListWidgetItem* current_item, + QListWidgetItem* previous_item) { - loadTheme(FileName(fromqstr(theme_fullpaths_[themesLW->row(item)]))); - theme_filename_ = onlyFileName(theme_fullpaths_[themesLW->row(item)]); + Q_UNUSED(previous_item) + + loadTheme(FileName(fromqstr(theme_fullpaths_[themesLW->row(current_item)]))); + theme_filename_ = onlyFileName(theme_fullpaths_[themesLW->row(current_item)]); theme_name_ = removeExtension(theme_filename_).replace('_', ' '); } diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h index d61212cda9..95c9e3fee9 100644 --- a/src/frontends/qt/GuiPrefs.h +++ b/src/frontends/qt/GuiPrefs.h @@ -278,7 +278,8 @@ private Q_SLOTS: void setDisabledResets(); void openThemeMenu(); void saveThemeInterface(); - void loadThemeInterface(QListWidgetItem* item); + void loadThemeInterface(QListWidgetItem* current_item, + QListWidgetItem* previous_item); void removeTheme(); void exportThemeInterface(); void importThemeInterface(); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs