ui & logic: fixes for release
* smaller indexing progress dialog with bar in the middle instead of golden ratio * set default code snippet expand range to 3 * no minimum height for project file location element in project setup wizard * move aggregation and inheritance edges to front when hovered or active * push parent nodes of active nodes to back to make edges to the active child visible * properly quit application when window is closed while confirm box is open * properly quit application when window is closed while indexing * only count top level nodes for count on bundle nodes * give noLetterScore to index 0 in search index scoring bug id = 121
This commit is contained in:
@@ -290,6 +290,7 @@ add_files(
|
||||
utility/messaging/type/MessageStatus.h
|
||||
utility/messaging/type/MessageSwitchColorScheme.h
|
||||
utility/messaging/type/MessageUndo.h
|
||||
utility/messaging/type/MessageWindowClosed.h
|
||||
utility/messaging/type/MessageWindowFocus.h
|
||||
utility/messaging/type/MessageZoom.h
|
||||
|
||||
@@ -334,7 +335,7 @@ add_files(
|
||||
utility/solution/SolutionParserUtility.h
|
||||
utility/solution/SolutionParserVisualStudio.cpp
|
||||
utility/solution/SolutionParserVisualStudio.h
|
||||
|
||||
|
||||
utility/synchronization/ReaderWriterLock.cpp
|
||||
utility/synchronization/ReaderWriterLock.h
|
||||
utility/synchronization/ScopedReaderLock.cpp
|
||||
|
||||
@@ -742,7 +742,7 @@ void GraphController::bundleNodesAndEdgesMatching(
|
||||
node->visible = false;
|
||||
|
||||
bundleNode->bundledNodes.push_back(node);
|
||||
bundleNode->bundledNodeCount += node->getConnectedSubNodeCount();
|
||||
bundleNode->bundledNodeCount += node->getBundledNodeCount();
|
||||
|
||||
m_dummyNodes.erase(m_dummyNodes.begin() + matchedNodeIndices[i]);
|
||||
}
|
||||
|
||||
@@ -140,23 +140,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t getConnectedSubNodeCount() const
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
if (connected)
|
||||
{
|
||||
count += 1;
|
||||
}
|
||||
|
||||
for (std::shared_ptr<DummyNode> node : subNodes)
|
||||
{
|
||||
count += node->getConnectedSubNodeCount();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
std::vector<const DummyNode*> getConnectedSubNodes() const
|
||||
{
|
||||
std::vector<const DummyNode*> nodes;
|
||||
|
||||
@@ -455,7 +455,7 @@ GraphViewStyle::EdgeStyle GraphViewStyle::getStyleForEdgeType(Edge::EdgeType typ
|
||||
style.originOffset.y = 0;
|
||||
style.targetOffset.y = 0;
|
||||
style.verticalOffset = 0;
|
||||
style.zValue = isActive ? -2 : -5;
|
||||
style.zValue = isActive ? 1 : -5;
|
||||
break;
|
||||
case Edge::EDGE_CALL:
|
||||
style.originOffset.y = 1;
|
||||
@@ -472,7 +472,7 @@ GraphViewStyle::EdgeStyle GraphViewStyle::getStyleForEdgeType(Edge::EdgeType typ
|
||||
style.arrowWidth = 14;
|
||||
style.arrowClosed = true;
|
||||
style.targetOffset.x = 34;
|
||||
style.zValue = isActive ? -1 : -3;
|
||||
style.zValue = isActive ? 2 : -3;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -402,7 +402,7 @@ int SearchIndex::score(const std::string& text, const std::vector<size_t>& indic
|
||||
}
|
||||
|
||||
// after no letter
|
||||
bool prevIsNoLetter = (index > 0 && noLetters.find(text[index - 1]) != noLetters.end());
|
||||
bool prevIsNoLetter = (index == 0 || noLetters.find(text[index - 1]) != noLetters.end());
|
||||
if (prevIsNoLetter)
|
||||
{
|
||||
noLetterScore += noLetterBonus;
|
||||
|
||||
@@ -261,7 +261,7 @@ void ApplicationSettings::setCodeSnippetSnapRange(int range)
|
||||
|
||||
int ApplicationSettings::getCodeSnippetExpandRange() const
|
||||
{
|
||||
return getValue<int>("code/snippet/expand_range", 2);
|
||||
return getValue<int>("code/snippet/expand_range", 3);
|
||||
}
|
||||
|
||||
void ApplicationSettings::setCodeSnippetExpandRange(int range)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef MESSAGE_WINDOW_CLOSED_H
|
||||
#define MESSAGE_WINDOW_CLOSED_H
|
||||
|
||||
#include "utility/messaging/Message.h"
|
||||
|
||||
class MessageWindowClosed
|
||||
: public Message<MessageWindowClosed>
|
||||
{
|
||||
public:
|
||||
MessageWindowClosed()
|
||||
{
|
||||
setSendAsTask(false);
|
||||
}
|
||||
|
||||
static const std::string getStaticType()
|
||||
{
|
||||
return "MessageWindowClosed";
|
||||
}
|
||||
};
|
||||
|
||||
#endif // MESSAGE_WINDOW_CLOSED_H
|
||||
@@ -38,6 +38,9 @@ void TaskGroupParallel::doEnter(std::shared_ptr<Blackboard> blackboard)
|
||||
|
||||
Task::TaskState TaskGroupParallel::doUpdate(std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
const int SLEEP_TIME_MS = 25;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME_MS));
|
||||
|
||||
if (m_tasks.size() != 0 && getActveTaskCount() > 0)
|
||||
{
|
||||
return STATE_RUNNING;
|
||||
@@ -72,8 +75,6 @@ void TaskGroupParallel::doReset(std::shared_ptr<Blackboard> blackboard)
|
||||
|
||||
void TaskGroupParallel::processTaskThreaded(std::shared_ptr<TaskInfo> taskInfo, std::shared_ptr<Blackboard> blackboard)
|
||||
{
|
||||
const int SLEEP_TIME_MS = 25;
|
||||
|
||||
ScopedFunctor functor([&](){
|
||||
std::lock_guard<std::mutex> lock(m_activeTaskCountMutex);
|
||||
m_activeTaskCount--;
|
||||
@@ -92,8 +93,6 @@ void TaskGroupParallel::processTaskThreaded(std::shared_ptr<TaskInfo> taskInfo,
|
||||
taskInfo->active = false;
|
||||
break;
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME_MS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,6 @@ void TaskScheduler::startSchedulerLoopThreaded()
|
||||
|
||||
void TaskScheduler::startSchedulerLoop()
|
||||
{
|
||||
const int SLEEP_TIME_MS = 25;
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_loopMutex);
|
||||
|
||||
@@ -75,6 +73,7 @@ void TaskScheduler::startSchedulerLoop()
|
||||
}
|
||||
}
|
||||
|
||||
const int SLEEP_TIME_MS = 25;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME_MS));
|
||||
}
|
||||
|
||||
@@ -156,6 +155,15 @@ void TaskScheduler::processTasks()
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_loopMutex);
|
||||
|
||||
if (!m_loopIsRunning)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user