Issue #556 Goto main class on startup not working fix

This commit is contained in:
Jindra Petk
2014-04-04 06:51:59 +02:00
parent 9774fbd2a7
commit 8734eb3381
2 changed files with 10 additions and 2 deletions

View File

@@ -375,6 +375,7 @@ public class Main {
@Override
protected Object doInBackground() throws Exception {
boolean first = true;
SWF firstSWF = null;
for (final SWFSourceInfo sourceInfo : sourceInfos) {
SWFList swfs = null;
try {
@@ -391,6 +392,9 @@ public class Main {
final SWFList swfs1 = swfs;
final boolean first1 = first;
first = false;
if(firstSWF == null){
firstSWF = swfs1.get(0);
}
try {
Main.startWork(AppStrings.translate("work.creatingwindow") + "...");
View.execInEventDispatch(new Runnable() {
@@ -407,6 +411,7 @@ public class Main {
}
loadingDialog.setVisible(false);
final SWF fswf = firstSWF;
View.execInEventDispatch(new Runnable() {
@Override
public void run() {
@@ -414,6 +419,9 @@ public class Main {
mainFrame.setVisible(true);
}
Main.stopWork();
if (mainFrame != null && Configuration.gotoMainClassOnStartup.get()) {
mainFrame.getPanel().gotoDocumentClass(fswf);
}
}
});

View File

@@ -720,9 +720,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
showCard(CARDEMPTYPANEL);
updateUi(swf);
if (first && Configuration.gotoMainClassOnStartup.get()) {
/*if (first && Configuration.gotoMainClassOnStartup.get()) {
gotoDocumentClass(swf);
}
}*/
first = false;
}
}