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:
@@ -36,7 +36,7 @@ QTableView {
|
||||
alternate-background-color: <color:table/table_line_2/normal>;
|
||||
border-radius: 10px;
|
||||
border: 1px solid <color:table/table>;
|
||||
margin: 10px;
|
||||
margin: 10px 10px 2px;
|
||||
padding-right: 10px;
|
||||
font-size: <setting:font_size>px;
|
||||
}
|
||||
@@ -84,6 +84,7 @@ QHeaderView::section:vertical {
|
||||
QCheckBox {
|
||||
color: <color:table/text/normal>;
|
||||
border-color: <color:table/table>;
|
||||
margin: 0;
|
||||
/*background-color: <color:table/table>;*/
|
||||
}
|
||||
|
||||
@@ -120,4 +121,3 @@ QTableView QTableCornerButton::section {
|
||||
border-bottom: 1px solid <color:table/table>;
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<config>
|
||||
<source_groups>
|
||||
<source_group_afdfade2-4b42-49a6-961a-d4a563f2cf84>
|
||||
<name>C++ Source Group</name>
|
||||
<source_extensions>
|
||||
<source_extension>.cpp</source_extension>
|
||||
<source_extension>.cxx</source_extension>
|
||||
|
||||
@@ -458,7 +458,7 @@ public class AstVisitor extends AstVisitorAdapter
|
||||
}
|
||||
else
|
||||
{
|
||||
m_client.recordError("Import not found.", true, true, n.getRange());
|
||||
m_client.recordError("Import not found: " + name, true, true, n.getRange());
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -519,14 +519,21 @@ void QtCodeArea::mouseReleaseEvent(QMouseEvent* event)
|
||||
QTextCursor cursor = this->cursorForPosition(event->pos());
|
||||
std::vector<const Annotation*> annotations = getInteractiveAnnotationsForPosition(cursor.position());
|
||||
|
||||
if (m_navigator->hasErrors())
|
||||
if (annotations.size())
|
||||
{
|
||||
activateErrors(annotations);
|
||||
if (m_navigator->hasErrors())
|
||||
{
|
||||
activateErrors(annotations);
|
||||
}
|
||||
else
|
||||
{
|
||||
activateSourceLocations(annotations);
|
||||
activateLocalSymbols(annotations);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (m_navigator->getActiveLocalSymbolIds().size())
|
||||
{
|
||||
activateSourceLocations(annotations);
|
||||
activateLocalSymbols(annotations);
|
||||
MessageActivateLocalSymbols(std::vector<Id>()).dispatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,29 +105,32 @@ void QtGraphicsView::ensureVisibleAnimated(const QRectF& rect, int xmargin, int
|
||||
|
||||
ensureVisible(rect, xmargin, ymargin);
|
||||
|
||||
int xval2 = horizontalScrollBar()->value();
|
||||
int yval2 = verticalScrollBar()->value();
|
||||
if (ApplicationSettings::getInstance()->getUseAnimations())
|
||||
{
|
||||
int xval2 = horizontalScrollBar()->value();
|
||||
int yval2 = verticalScrollBar()->value();
|
||||
|
||||
horizontalScrollBar()->setValue(xval);
|
||||
verticalScrollBar()->setValue(yval);
|
||||
horizontalScrollBar()->setValue(xval);
|
||||
verticalScrollBar()->setValue(yval);
|
||||
|
||||
QParallelAnimationGroup* move = new QParallelAnimationGroup();
|
||||
QParallelAnimationGroup* move = new QParallelAnimationGroup();
|
||||
|
||||
QPropertyAnimation* xanim = new QPropertyAnimation(horizontalScrollBar(), "value");
|
||||
xanim->setDuration(150);
|
||||
xanim->setStartValue(xval);
|
||||
xanim->setEndValue(xval2);
|
||||
xanim->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
move->addAnimation(xanim);
|
||||
QPropertyAnimation* xanim = new QPropertyAnimation(horizontalScrollBar(), "value");
|
||||
xanim->setDuration(150);
|
||||
xanim->setStartValue(xval);
|
||||
xanim->setEndValue(xval2);
|
||||
xanim->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
move->addAnimation(xanim);
|
||||
|
||||
QPropertyAnimation* yanim = new QPropertyAnimation(verticalScrollBar(), "value");
|
||||
yanim->setDuration(150);
|
||||
yanim->setStartValue(yval);
|
||||
yanim->setEndValue(yval2);
|
||||
yanim->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
move->addAnimation(yanim);
|
||||
QPropertyAnimation* yanim = new QPropertyAnimation(verticalScrollBar(), "value");
|
||||
yanim->setDuration(150);
|
||||
yanim->setStartValue(yval);
|
||||
yanim->setEndValue(yval2);
|
||||
yanim->setEasingCurve(QEasingCurve::InOutQuad);
|
||||
move->addAnimation(yanim);
|
||||
|
||||
move->start();
|
||||
move->start();
|
||||
}
|
||||
}
|
||||
|
||||
void QtGraphicsView::updateZoom(float delta)
|
||||
@@ -165,6 +168,8 @@ void QtGraphicsView::resizeEvent(QResizeEvent* event)
|
||||
|
||||
m_zoomInButton->setIconSize(QSize(15, 15));
|
||||
m_zoomOutButton->setIconSize(QSize(15, 15));
|
||||
|
||||
emit resized();
|
||||
}
|
||||
|
||||
void QtGraphicsView::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
@@ -46,6 +46,7 @@ protected:
|
||||
signals:
|
||||
void emptySpaceClicked();
|
||||
void characterKeyPressed(QChar c);
|
||||
void resized();
|
||||
|
||||
private slots:
|
||||
void updateTimer();
|
||||
|
||||
@@ -68,7 +68,7 @@ void QtErrorView::initView()
|
||||
QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
|
||||
|
||||
QBoxLayout* layout = new QVBoxLayout();
|
||||
layout->setContentsMargins(0, 0, 0, 5);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
widget->setLayout(layout);
|
||||
|
||||
@@ -107,7 +107,8 @@ void QtErrorView::initView()
|
||||
|
||||
// Setup Checkboxes
|
||||
QBoxLayout* checkboxes = new QHBoxLayout();
|
||||
checkboxes->addSpacing(15);
|
||||
checkboxes->setContentsMargins(10, 0, 0, 0);
|
||||
checkboxes->setSpacing(0);
|
||||
|
||||
{
|
||||
m_showFatals = createFilterCheckbox("fatals", m_errorFilter.fatal, checkboxes);
|
||||
|
||||
@@ -82,6 +82,7 @@ void QtGraphView::initView()
|
||||
|
||||
connect(view, SIGNAL(emptySpaceClicked()), this, SLOT(clickedInEmptySpace()));
|
||||
connect(view, SIGNAL(characterKeyPressed(QChar)), this, SLOT(pressedCharacterKey(QChar)));
|
||||
connect(view, SIGNAL(resized()), this, SLOT(resized()));
|
||||
|
||||
m_scrollSpeedChangeListenerHorizontal.setScrollBar(view->horizontalScrollBar());
|
||||
m_scrollSpeedChangeListenerVertical.setScrollBar(view->verticalScrollBar());
|
||||
@@ -337,6 +338,11 @@ void QtGraphView::scrolled(int)
|
||||
MessageScrollGraph(view->horizontalScrollBar()->value(), view->verticalScrollBar()->value()).dispatch();
|
||||
}
|
||||
|
||||
void QtGraphView::resized()
|
||||
{
|
||||
doResize();
|
||||
}
|
||||
|
||||
void QtGraphView::trailDepthChanged(int)
|
||||
{
|
||||
if (m_trailDepthSlider->value() == m_trailDepthSlider->maximum())
|
||||
@@ -1065,7 +1071,7 @@ void QtGraphView::createTransition()
|
||||
|
||||
anim->setDuration(300);
|
||||
|
||||
if (!remainingNodes.size() || m_scrollToTop)
|
||||
if (!remainingNodes.size() || m_scrollToTop || m_restoreScroll)
|
||||
{
|
||||
connect(anim, SIGNAL(finished()), this, SLOT(updateScrollBars()));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ private slots:
|
||||
void finishedTransition();
|
||||
void clickedInEmptySpace();
|
||||
void pressedCharacterKey(QChar c);
|
||||
|
||||
void scrolled(int);
|
||||
void resized();
|
||||
|
||||
void trailDepthChanged(int);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void QtStatusView::initView()
|
||||
QWidget* widget = QtViewWidgetWrapper::getWidgetOfView(this);
|
||||
|
||||
QBoxLayout* layout = new QVBoxLayout();
|
||||
layout->setContentsMargins(0, 0, 0, 5);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
widget->setLayout(layout);
|
||||
|
||||
@@ -57,7 +57,8 @@ void QtStatusView::initView()
|
||||
|
||||
// Setup filters
|
||||
QHBoxLayout* filters = new QHBoxLayout();
|
||||
filters->addSpacing(15);
|
||||
filters->setContentsMargins(10, 0, 0, 0);
|
||||
filters->setSpacing(25);
|
||||
|
||||
const StatusFilter filter = ApplicationSettings::getInstance()->getStatusFilter();
|
||||
m_showInfo = createFilterCheckbox("info", filters, filter & StatusType::STATUS_INFO);
|
||||
@@ -100,7 +101,6 @@ QCheckBox* QtStatusView::createFilterCheckbox(const QString& name, QBoxLayout* l
|
||||
);
|
||||
|
||||
layout->addWidget(checkbox);
|
||||
layout->addSpacing(25);
|
||||
|
||||
return checkbox;
|
||||
}
|
||||
@@ -168,9 +168,5 @@ void QtStatusView::setStyleSheet() const
|
||||
QPalette palette(m_showErrors->palette());
|
||||
palette.setColor(QPalette::WindowText, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str()));
|
||||
|
||||
// widget->setStyleSheet(
|
||||
// utility::getStyleSheet(ResourcePaths::getGuiPath() + "error_view/error_view.css").c_str()
|
||||
// );
|
||||
|
||||
m_table->updateRows();
|
||||
}
|
||||
|
||||
@@ -89,5 +89,5 @@ void QtPreferencesWindow::handleNext()
|
||||
MessageRefresh().refreshUiOnly().dispatch();
|
||||
}
|
||||
|
||||
QtWindow::handleNext();
|
||||
QtWindow::handleClose();
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ void QtProjectWizzard::populateWindow(QWidget* widget)
|
||||
separator->setPalette(palette);
|
||||
|
||||
layout->addWidget(separator);
|
||||
layout->addSpacing(10);
|
||||
|
||||
m_contentWidget = new QWidget();
|
||||
m_contentWidget->setObjectName("form");
|
||||
|
||||
Reference in New Issue
Block a user