Skip to content

Commit

Permalink
GUI: Fix status bar not showing text when it should
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent 00e2254 commit 305fd5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ void MainWindow::slotLog(const QString &text) {
_log->append(text);
}

// called when the populate thread finishes
void MainWindow::finishTree() {
if (_proxyModel)
delete _proxyModel;
Expand All @@ -270,18 +271,16 @@ void MainWindow::finishTree() {
QObject::connect(_treeView->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &MainWindow::resourceSelect);

_status->setText("Idle...");
_status->pop();
}

void MainWindow::setTreeViewModel(const QString &path) {
if (_rootPath == path)
return;
_rootPath = path;

// popped in finishTree
_status->push("Populating resource tree...");
BOOST_SCOPE_EXIT((&_status)) {
_status->pop();
} BOOST_SCOPE_EXIT_END

_treeView->setModel(nullptr);

Expand Down
2 changes: 0 additions & 2 deletions src/gui/resourcetree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ ResourceTree::ResourceTree(MainWindow *mainWindow, const QString &path, QObject

_root = new ResourceTreeItem("Filename", nullptr);

_mainWindow->status()->setText("Populating resource tree...");

ResourceTreeItem *top = _root;

// If the root path is a directory, add a top level item
Expand Down

0 comments on commit 305fd5e

Please sign in to comment.