summaryrefslogtreecommitdiff
path: root/src/datatab.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-29 19:27:10 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-29 19:27:10 +0100
commit48fae18ac6baced388b1fa7cee6c18e6aa8dbab3 (patch)
tree4fc903d08ca5d41c5eb2ae527bea6f7069bdf587 /src/datatab.h
parentab820c1b0a5bb0f002ec5aba7954330acbdeb978 (diff)
Fix refresh of data tab.
Diffstat (limited to 'src/datatab.h')
-rw-r--r--src/datatab.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/datatab.h b/src/datatab.h
index 32d788f6..ad172ab0 100644
--- a/src/datatab.h
+++ b/src/datatab.h
@@ -29,6 +29,10 @@ public:
void restoreState(const Settings& s);
void activated();
+ // if the data tab is currently visible, trigger an update of the
+ // tree, otherwise mark the tree has modified and will refresh when
+ // the tab is activated
+ //
void updateTree();
signals:
@@ -39,6 +43,8 @@ signals:
private:
struct DataTabUi
{
+ QTabWidget* tabs;
+ QWidget* tab;
QPushButton* refresh;
QTreeView* tree;
QCheckBox* conflicts;
@@ -52,7 +58,7 @@ private:
std::unique_ptr<FileTree> m_filetree;
std::vector<QTreeWidgetItem*> m_removeLater;
MOBase::FilterWidget m_filter;
- bool m_firstActivation;
+ bool m_needUpdate;
void onRefresh();
void onItemExpanded(QTreeWidgetItem* item);
@@ -60,6 +66,8 @@ private:
void onArchives();
void updateOptions();
void ensureFullyLoaded();
+ bool isActive() const;
+ void doUpdateTree();
};
#endif // MODORGANIZER_DATATAB_INCLUDED