From 39d1628da5b25ac02c5979c1e054dad724ef858a Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Thu, 18 Mar 2021 18:04:25 -0700 Subject: [PATCH 1/2] Qt/MemoryCardEditor: Set combobox indices to 0 on close event Fixes persisting dirty card state when reopening memory card editor. --- src/duckstation-qt/memorycardeditordialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/memorycardeditordialog.cpp b/src/duckstation-qt/memorycardeditordialog.cpp index 6bcdf8046..6fb445d82 100644 --- a/src/duckstation-qt/memorycardeditordialog.cpp +++ b/src/duckstation-qt/memorycardeditordialog.cpp @@ -62,8 +62,8 @@ void MemoryCardEditorDialog::resizeEvent(QResizeEvent* ev) void MemoryCardEditorDialog::closeEvent(QCloseEvent* ev) { - promptForSave(&m_card_a); - promptForSave(&m_card_b); + m_card_a.path_cb->setCurrentIndex(0); + m_card_b.path_cb->setCurrentIndex(0); } void MemoryCardEditorDialog::connectUi() From d7196f1f859ed56acfd22b0b00f4916b1c1e7f3c Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Thu, 18 Mar 2021 18:21:53 -0700 Subject: [PATCH 2/2] Qt/MemoryCardEditor: Add tool tips for new card and open card buttons --- src/duckstation-qt/memorycardeditordialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/duckstation-qt/memorycardeditordialog.cpp b/src/duckstation-qt/memorycardeditordialog.cpp index 6fb445d82..1ec9482f4 100644 --- a/src/duckstation-qt/memorycardeditordialog.cpp +++ b/src/duckstation-qt/memorycardeditordialog.cpp @@ -30,6 +30,13 @@ MemoryCardEditorDialog::MemoryCardEditorDialog(QWidget* parent) : QDialog(parent connectUi(); populateComboBox(m_ui.cardAPath); populateComboBox(m_ui.cardBPath); + + static constexpr char new_card_hover_text[] = TRANSLATABLE("MemoryCardEditorDialog", "New Card..."); + static constexpr char open_card_hover_text[] = TRANSLATABLE("MemoryCardEditorDialog", "Open Card..."); + m_ui.newCardA->setToolTip(QString(new_card_hover_text)); + m_ui.newCardB->setToolTip(QString(new_card_hover_text)); + m_ui.openCardA->setToolTip(QString(open_card_hover_text)); + m_ui.openCardB->setToolTip(QString(open_card_hover_text)); } MemoryCardEditorDialog::~MemoryCardEditorDialog() = default;