commit 6b06f479d4bd9d571317c6107e5bb36cc916cf59
parent 2e1b451455164544f141b038809ace4a074d25e3
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sat, 20 Aug 2016 21:10:14 -0400
about: fix list refresh when switching delegates
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/about.cpp b/src/about.cpp
@@ -38,7 +38,7 @@ using namespace std;
enum { ACTION_ABOUT_PKG = 300, ACTION_COPY_URL };
-About::About() : Dialog(IDD_ABOUT_DIALOG), m_currentIndex(-255)
+About::About() : Dialog(IDD_ABOUT_DIALOG)
{
RichEdit::Init();
}
@@ -81,6 +81,7 @@ void About::onCommand(const int id, int)
void About::setDelegate(const DelegatePtr &model)
{
clear();
+
m_delegate = model;
m_delegate->init(this);
m_menu->sort();
@@ -104,6 +105,8 @@ void About::clear()
m_delegate = nullptr;
m_links.clear();
+ m_currentIndex = -255;
+
const int controls[] = {
IDC_ABOUT,
IDC_MENU,