git-svn-id: svn://db.shs.com.ru/libs@365 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-03-12 18:57:16 +00:00
parent ce34dc1cec
commit d15c84e686
2 changed files with 5 additions and 1 deletions

View File

@@ -169,6 +169,7 @@ void ProjectFilesystemWidget::projectsChanged() {
int spos = tree->verticalScrollBar()->value(); int spos = tree->verticalScrollBar()->value();
rememberExpanded(tree->invisibleRootItem()); rememberExpanded(tree->invisibleRootItem());
tree->clear(); tree->clear();
QApplication::setOverrideCursor(Qt::WaitCursor);
QList<ProjectExplorer::Project *> pl = ProjectExplorer::SessionManager::projects(); QList<ProjectExplorer::Project *> pl = ProjectExplorer::SessionManager::projects();
for (ProjectExplorer::Project * p: pl) { for (ProjectExplorer::Project * p: pl) {
QTreeWidgetItem * ri = new QTreeWidgetItem(); QTreeWidgetItem * ri = new QTreeWidgetItem();
@@ -188,6 +189,7 @@ void ProjectFilesystemWidget::projectsChanged() {
fileChanged(); fileChanged();
filter(); filter();
restoreExpanded(tree->invisibleRootItem()); restoreExpanded(tree->invisibleRootItem());
QApplication::restoreOverrideCursor();
qApp->processEvents(); qApp->processEvents();
tree->verticalScrollBar()->setValue(spos); tree->verticalScrollBar()->setValue(spos);
} }

View File

@@ -764,6 +764,8 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou
//bool fast = true; //bool fast = true;
bool can_fast = (start_x == 0 && end_x == 0 && start_y == 0 && end_y == 0); bool can_fast = (start_x == 0 && end_x == 0 && start_y == 0 && end_y == 0);
bool anyVisible = false, isTimeLimit = (visible_time > 0.) && !(isRangeX || isRangeY); bool anyVisible = false, isTimeLimit = (visible_time > 0.) && !(isRangeX || isRangeY);
bool force_find = (visible_time > 0.) && (history > 0.) && (visible_time < history);
if (force_find) can_fast = false;
// foreach (const GraphicType & t, graphics) { // foreach (const GraphicType & t, graphics) {
// const QPolygonF & pol(pause_ ? t.polyline_pause : t.polyline); // const QPolygonF & pol(pause_ ? t.polyline_pause : t.polyline);
// if (!pol.isEmpty()) { // if (!pol.isEmpty()) {
@@ -785,7 +787,7 @@ void Graphic::findGraphicsRect(double start_x, double end_x, double start_y, dou
if (vx < (pause_ ? t.max_x_pause : t.max_x)) vx = (pause_ ? t.max_x_pause : t.max_x); if (vx < (pause_ ? t.max_x_pause : t.max_x)) vx = (pause_ ? t.max_x_pause : t.max_x);
} }
vx -= visible_time; vx -= visible_time;
// qDebug() << "[Graphic]" << "can_fast" << can_fast; //qDebug() << "[Graphic]" << "can_fast" << can_fast;
for (int g = 0; g < graphics.size(); g++) { for (int g = 0; g < graphics.size(); g++) {
GraphicType & t(graphics[g]); GraphicType & t(graphics[g]);
if (!t.visible) continue; if (!t.visible) continue;