mirror of
https://github.com/libretro/RetroArch
synced 2025-03-22 07:21:15 +00:00
Qt: always set the current tab on startup
This commit is contained in:
parent
e579842620
commit
978edc7acf
@ -535,15 +535,12 @@ static void* ui_companion_qt_init(void)
|
|||||||
/* setting the last tab must come after setting the view type */
|
/* setting the last tab must come after setting the view type */
|
||||||
if (qsettings->contains("save_last_tab"))
|
if (qsettings->contains("save_last_tab"))
|
||||||
{
|
{
|
||||||
if (qsettings->contains("last_tab"))
|
int lastTabIndex = qsettings->value("last_tab", 0).toInt();
|
||||||
{
|
|
||||||
int lastTabIndex = qsettings->value("last_tab", 0).toInt();
|
|
||||||
|
|
||||||
if (lastTabIndex >= 0 && browserAndPlaylistTabWidget->count() > lastTabIndex)
|
if (lastTabIndex >= 0 && browserAndPlaylistTabWidget->count() > lastTabIndex)
|
||||||
{
|
{
|
||||||
browserAndPlaylistTabWidget->setCurrentIndex(lastTabIndex);
|
browserAndPlaylistTabWidget->setCurrentIndex(lastTabIndex);
|
||||||
mainwindow->onTabWidgetIndexChanged(lastTabIndex);
|
mainwindow->onTabWidgetIndexChanged(lastTabIndex);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user