logic: Fixed deselection of edge didn't restore active locations in code view
This commit is contained in:
@@ -51,6 +51,7 @@ void CodeController::handleMessage(MessageActivateTokens* message)
|
||||
|
||||
if (message->keepContent())
|
||||
{
|
||||
view->showActiveTokenIds();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
virtual void showCodeFile(const CodeSnippetParams& params) = 0;
|
||||
|
||||
virtual void showFirstActiveSnippet() = 0;
|
||||
virtual void showActiveTokenIds() = 0;
|
||||
|
||||
virtual void focusTokenIds(const std::vector<Id>& focusedTokenIds) = 0;
|
||||
virtual void defocusTokenIds() = 0;
|
||||
|
||||
@@ -107,6 +107,11 @@ void QtCodeFileList::setErrorMessages(const std::vector<std::string>& errorMessa
|
||||
m_errorMessages = errorMessages;
|
||||
}
|
||||
|
||||
void QtCodeFileList::showActiveTokenIds()
|
||||
{
|
||||
updateFiles();
|
||||
}
|
||||
|
||||
bool QtCodeFileList::scrollToFirstActiveSnippet()
|
||||
{
|
||||
updateFiles();
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
const std::vector<std::string>& getErrorMessages() const;
|
||||
void setErrorMessages(const std::vector<std::string>& errorMessages);
|
||||
|
||||
void showActiveTokenIds();
|
||||
|
||||
bool scrollToFirstActiveSnippet();
|
||||
void expandActiveSnippetFile();
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ QtCodeView::QtCodeView(ViewLayout* viewLayout)
|
||||
, m_addCodeSnippetsFunctor(std::bind(&QtCodeView::doAddCodeSnippets, this, std::placeholders::_1, std::placeholders::_2))
|
||||
, m_showCodeFileFunctor(std::bind(&QtCodeView::doShowCodeFile, this, std::placeholders::_1))
|
||||
, m_doShowFirstActiveSnippetFunctor(std::bind(&QtCodeView::doShowFirstActiveSnippet, this))
|
||||
, m_doShowActiveTokenIdsFunctor(std::bind(&QtCodeView::doShowActiveTokenIds, this))
|
||||
, m_focusTokenIdsFunctor(std::bind(&QtCodeView::doFocusTokenIds, this, std::placeholders::_1))
|
||||
, m_defocusTokenIdsFunctor(std::bind(&QtCodeView::doDefocusTokenIds, this))
|
||||
, m_isExpanding(false)
|
||||
@@ -71,6 +72,11 @@ void QtCodeView::showFirstActiveSnippet()
|
||||
m_doShowFirstActiveSnippetFunctor();
|
||||
}
|
||||
|
||||
void QtCodeView::showActiveTokenIds()
|
||||
{
|
||||
m_doShowActiveTokenIdsFunctor();
|
||||
}
|
||||
|
||||
void QtCodeView::focusTokenIds(const std::vector<Id>& focusedTokenIds)
|
||||
{
|
||||
m_focusTokenIdsFunctor(focusedTokenIds);
|
||||
@@ -159,6 +165,12 @@ void QtCodeView::doShowFirstActiveSnippet()
|
||||
}
|
||||
}
|
||||
|
||||
void QtCodeView::doShowActiveTokenIds()
|
||||
{
|
||||
m_widget->setActiveTokenIds(m_activeTokenIds);
|
||||
m_widget->showActiveTokenIds();
|
||||
}
|
||||
|
||||
void QtCodeView::doFocusTokenIds(const std::vector<Id>& focusedTokenIds)
|
||||
{
|
||||
m_widget->focusTokenIds(focusedTokenIds);
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
virtual void showCodeFile(const CodeSnippetParams& params);
|
||||
|
||||
virtual void showFirstActiveSnippet();
|
||||
virtual void showActiveTokenIds();
|
||||
|
||||
virtual void focusTokenIds(const std::vector<Id>& focusedTokenIds);
|
||||
virtual void defocusTokenIds();
|
||||
@@ -46,6 +47,7 @@ private:
|
||||
void doShowCodeFile(const CodeSnippetParams& params);
|
||||
|
||||
void doShowFirstActiveSnippet();
|
||||
void doShowActiveTokenIds();
|
||||
|
||||
void doFocusTokenIds(const std::vector<Id>& focusedTokenIds);
|
||||
void doDefocusTokenIds();
|
||||
@@ -57,6 +59,7 @@ private:
|
||||
QtThreadedFunctor<const std::vector<CodeSnippetParams>&, bool> m_addCodeSnippetsFunctor;
|
||||
QtThreadedFunctor<const CodeSnippetParams&> m_showCodeFileFunctor;
|
||||
QtThreadedFunctor<> m_doShowFirstActiveSnippetFunctor;
|
||||
QtThreadedFunctor<> m_doShowActiveTokenIdsFunctor;
|
||||
QtThreadedFunctor<const std::vector<Id>&> m_focusTokenIdsFunctor;
|
||||
QtThreadedFunctor<> m_defocusTokenIdsFunctor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user