mirror of
https://github.com/octopusYan/dayz-mod-translator.git
synced 2024-12-04 01:26:42 +08:00
fix: 修复二次加载pbo时,翻译进度条变粗的问题
This commit is contained in:
parent
c6ad66bb59
commit
cb5e0229ff
@ -14,6 +14,7 @@ import cn.octopusyan.dmt.view.ConsoleLog;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.concurrent.Worker;
|
||||
import javafx.scene.control.ProgressIndicator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -192,7 +193,10 @@ public class MainViewModel extends BaseViewModel<MainController> {
|
||||
private void resetProgress() {
|
||||
translateTask = null;
|
||||
controller.translate.setGraphic(startIcon);
|
||||
ObservableList<String> styleClass = controller.translateProgress.getStyleClass();
|
||||
if (!styleClass.contains(Styles.SMALL)) {
|
||||
Styles.toggleStyleClass(controller.translateProgress, Styles.SMALL);
|
||||
}
|
||||
controller.translateProgress.progressProperty().unbind();
|
||||
controller.translateProgress.setProgress(0);
|
||||
controller.translateProgress.setVisible(false);
|
||||
|
Loading…
Reference in New Issue
Block a user