Skip to content

Commit

Permalink
Fixed about tab visibility when expert mode is off
Browse files Browse the repository at this point in the history
  • Loading branch information
timsat committed May 14, 2014
1 parent 998836b commit 0e2312b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Software/src/SettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,9 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
void SettingsWindow::changePage(int page)
{
DEBUG_LOW_LEVEL << Q_FUNC_INFO << page;
int targetPage;
if (page > ui->tabWidget->count()-1)
targetPage = page-1;
else
targetPage = page;

ui->tabWidget->setCurrentIndex(page);
if (targetPage == 5) {
if (page == 5) {
ui->textBrowser->verticalScrollBar()->setValue(0);
m_smoothScrollTimer.setInterval(100);
m_smoothScrollTimer.start();
Expand Down Expand Up @@ -357,11 +352,8 @@ void SettingsWindow::onExpertModeEnabled_Toggled(bool isEnabled)
void SettingsWindow::updateExpertModeWidgetsVisibility()
{
if(Settings::isExpertModeEnabled()) {
if (ui->tabWidget->indexOf(ui->tabExperimental) < 0)
ui->tabWidget->insertTab(4,ui->tabExperimental, tr("Dev tab"));
ui->listWidget->setItemHidden(ui->listWidget->item(4),false);
} else {
ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabExperimental));
ui->listWidget->setItemHidden(ui->listWidget->item(4),true);
}

Expand Down

0 comments on commit 0e2312b

Please sign in to comment.