logic: Fixed project refresh to acknowledge project state

This commit is contained in:
Eberhard Graether
2016-08-26 12:42:57 +02:00
parent d25bba4b59
commit f719212678
10 changed files with 197 additions and 190 deletions
+22 -11
View File
@@ -20,7 +20,6 @@
QtCodeNavigator::QtCodeNavigator(QWidget* parent)
: QWidget(parent)
, m_switchReferenceFunctor(std::bind(&QtCodeNavigator::doSwitchReference, this, std::placeholders::_1))
, m_value(0)
, m_refIndex(0)
, m_scrollToFile(nullptr)
@@ -602,17 +601,29 @@ void QtCodeNavigator::ensureWidgetVisibleAnimated(QWidget *childWidget, QRectF r
void QtCodeNavigator::handleMessage(MessageCodeReference* message)
{
m_switchReferenceFunctor(message->type);
MessageCodeReference::ReferenceType type = message->type;
m_onQtThread(
[=]()
{
if (type == MessageCodeReference::REFERENCE_PREVIOUS)
{
previousReference();
}
else if (type == MessageCodeReference::REFERENCE_NEXT)
{
nextReference();
}
}
);
}
void QtCodeNavigator::doSwitchReference(MessageCodeReference::ReferenceType type)
void QtCodeNavigator::handleMessage(MessageWindowFocus* message)
{
if (type == MessageCodeReference::REFERENCE_PREVIOUS)
{
previousReference();
}
else if (type == MessageCodeReference::REFERENCE_NEXT)
{
nextReference();
}
m_onQtThread(
[=]()
{
m_list->onWindowFocus();
}
);
}