fix: select the english description tab when scraping.

This commit is contained in:
lantzelot-swe 2021-01-24 00:14:59 +01:00
parent 615147e83b
commit 986b88156e
4 changed files with 13 additions and 1 deletions

View File

@ -159,7 +159,7 @@ public class GameDetailsBackgroundPanel extends JPanel
return settingsPanel;
}
private InfoPanel getInfoPanel()
protected InfoPanel getInfoPanel()
{
if (infoPanel == null)
{

View File

@ -401,4 +401,9 @@ public class InfoPanel extends JPanel
}
return descriptionItPanel;
}
public void selectEnDescriptionTab()
{
getDescriptionTabbedPane().setSelectedIndex(0);
}
}

View File

@ -174,4 +174,9 @@ public class MainPanel extends JPanel
getGameDetailsBackgroundPanel().runCurrentGame();
}
}
public void selectEnDescriptionTab()
{
getGameDetailsBackgroundPanel().getInfoPanel().selectEnDescriptionTab();
}
}

View File

@ -5,6 +5,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import se.lantz.gui.MainWindow;
import se.lantz.model.InfoModel;
import se.lantz.model.MainViewModel;
import se.lantz.model.SystemModel;
@ -91,6 +92,7 @@ public class ScraperManager
if (fields.isDescription())
{
infoModel.setDescription(usedScraper.getDescription());
MainWindow.getInstance().getMainPanel().selectEnDescriptionTab();
}
if (fields.isGenre())
{