aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/tab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widgets/tab.cpp')
-rw-r--r--gui/widgets/tab.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index d373bc9222..1ca61565aa 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -104,10 +104,11 @@ uint16 TabWidget::getHeight() const {
return _h + _tabHeight;
}
-int TabWidget::addTab(const String &title) {
+int TabWidget::addTab(const String &title, const String &dialogName) {
// Add a new tab page
Tab newTab;
newTab.title = title;
+ newTab.dialogName = dialogName;
newTab.firstWidget = 0;
// Determine the new tab width
@@ -300,6 +301,10 @@ void TabWidget::reflowLayout() {
_tabs[_activeTab].firstWidget = _firstWidget;
for (uint i = 0; i < _tabs.size(); ++i) {
+ if (!_tabs[i].dialogName.empty()) {
+ g_gui.xmlEval()->reflowDialogLayout(_tabs[i].dialogName, _tabs[i].firstWidget);
+ }
+
Widget *w = _tabs[i].firstWidget;
while (w) {
w->reflowLayout();