Gui: [skip ci] connect to the tabwidget and check if the task tab was changed

This commit is contained in:
MA-LAPTOP\apeltauer
2020-06-22 18:13:11 +02:00
committed by wmayer
parent 1c8ad8731d
commit 5c8e23d1db
2 changed files with 9 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ ComboView::ComboView(bool showModel, Gui::Document* pcDocument, QWidget *parent)
tabs->setTabPosition(QTabWidget::North);
pLayout->addWidget( tabs, 0, 0 );
connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(onCurrentTabChanged(int)));
if (showModel) {
// splitter between tree and property view
QSplitter *splitter = new QSplitter();
@@ -145,5 +146,10 @@ void ComboView::changeEvent(QEvent *e)
DockWindow::changeEvent(e);
}
void ComboView::onCurrentTabChanged(int index)
{
if (index != taskIndex)
oldTabIndex = index;
}
#include "moc_ComboView.cpp"

View File

@@ -87,6 +87,9 @@ public:
void showTreeView();
void showTaskView();
private Q_SLOTS:
void onCurrentTabChanged(int index);
protected:
void showDialog(Gui::TaskView::TaskDialog *dlg);
void closeDialog();