src: More fixes for release

* Show declname in java import error
* Don't clear window stack when saving preferences
* Fixed spacing in source group UI, status view and error view
* Resize graph scene rect when widget is resized
* Graph node centering respect no animation preference
* Fixed undoing of view commands
* Avoid scrollbar jump when restoring graph scroll position
* Deactivate local symbols in code when clicking into empty space
This commit is contained in:
Eberhard Graether
2017-06-08 00:35:31 +02:00
parent 610dbf5bfb
commit 3e62367af0
13 changed files with 65 additions and 63 deletions
@@ -281,7 +281,7 @@ void UndoRedoController::handleMessage(MessageShowReference* message)
return;
}
Command command(std::make_shared<MessageShowReference>(*message), Command::ORDER_VIEW);
Command command(std::make_shared<MessageShowReference>(*message), Command::ORDER_VIEW, true);
processCommand(command);
}
@@ -395,9 +395,6 @@ void UndoRedoController::replayCommands()
void UndoRedoController::replayCommands(std::list<Command>::iterator it)
{
std::vector<std::list<Command>::iterator> viewCommands;
bool keepsContent = true;
std::map<std::string, std::list<Command>::iterator> lastOfType;
std::list<Command>::iterator at = it;
while (at != m_iterator)
@@ -410,6 +407,8 @@ void UndoRedoController::replayCommands(std::list<Command>::iterator it)
std::advance(at, 1);
}
bool keepsContent = true;
while (it != m_iterator)
{
if (!it->replayLastOnly || lastOfType[it->message->getType()] == it)
@@ -421,32 +420,10 @@ void UndoRedoController::replayCommands(std::list<Command>::iterator it)
keepsContent = false;
}
}
else if (it->order == Command::ORDER_VIEW)
{
viewCommands.push_back(it);
}
std::advance(it, 1);
}
std::set<std::string> messageTypes;
std::vector<std::list<Command>::iterator> lastViewCommands;
for (size_t i = viewCommands.size(); i > 0; i--)
{
it = viewCommands[i - 1];
if (messageTypes.find(it->message->getType()) == messageTypes.end())
{
messageTypes.insert(it->message->getType());
lastViewCommands.push_back(it);
}
}
for (size_t i = lastViewCommands.size(); i > 0; i--)
{
replayCommand(lastViewCommands[i - 1]);
}
MessageFlushUpdates(keepsContent).dispatch();
}
@@ -529,6 +506,11 @@ void UndoRedoController::processCommand(Command command)
bool UndoRedoController::sameMessageTypeAsLast(MessageBase* message) const
{
if (message->isReplayed())
{
return false;
}
if (!m_list.size() || m_list.begin() == m_iterator)
{
return false;