1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

Hide /Volumes if we made it visible when closing the settings dialog

This commit is contained in:
Leo Franchi
2012-11-25 22:32:05 -05:00
parent 428036866a
commit 3ed09d23f4
3 changed files with 18 additions and 0 deletions

View File

@@ -278,6 +278,8 @@ SettingsDialog::saveSettings()
if ( m_restartRequired )
QMessageBox::information( 0, tr( "Information" ), tr( "Some changed settings will not take effect until Tomahawk is restarted" ) );
m_collectionWidgetUi->dirTree->cleanup();
TomahawkUtils::NetworkProxyFactory* proxyFactory = TomahawkUtils::proxyFactory();
if ( !m_advancedWidgetUi->enableProxyCheckBox->isChecked() )
{

View File

@@ -44,6 +44,13 @@ CheckDirModel::CheckDirModel( QWidget* parent )
}
CheckDirModel::~CheckDirModel()
{
cleanup();
}
void
CheckDirModel::cleanup()
{
#ifdef Q_OS_MAC
// reset to previous state
@@ -190,6 +197,13 @@ CheckDirTree::CheckDirTree( QWidget* parent )
}
void
CheckDirTree::cleanup()
{
m_dirModel.cleanup();
}
void
CheckDirTree::checkPath( const QString& path, Qt::CheckState state )
{

View File

@@ -40,6 +40,7 @@ public:
void setCheck( const QModelIndex& index, const QVariant& value );
Qt::CheckState getCheck( const QModelIndex& index );
void cleanup();
signals:
void dataChangedByUser( const QModelIndex & index );
@@ -69,6 +70,7 @@ public:
QStringList getExclusions();
QStringList getCheckedPaths();
void cleanup();
signals:
void changed();