fix. во время переноса вкладок с компиляцией и запуском сбил сохранение текущиъ машины пользователя и компилятора
This commit is contained in:
@@ -108,19 +108,24 @@ public class GlobalDatabase extends SQLiteDatabase {
|
||||
public PassCode_2021 getSynchronizePassCode() {
|
||||
return null;
|
||||
}
|
||||
public void SaveCredentials() throws Exception {
|
||||
Credentials credentials = (Credentials) Current.get(Current.Credentials);
|
||||
if (Current.HasMachine())
|
||||
credentials.machine_id = Current.getMachine().id;
|
||||
if (Current.HasUser())
|
||||
credentials.user_id = Current.getUser().id;
|
||||
if (Current.HasCompiler())
|
||||
credentials.compiler_id = Current.getCompiler().id;
|
||||
if (Current.HasMakefile())
|
||||
credentials.makefile_id = Current.getMakefile().id;
|
||||
if (Current.HasRunConfiguration())
|
||||
credentials.runconfiguration_id = Current.getRunConfiguration().id;
|
||||
Update(credentials);
|
||||
public void SaveCredentials(){
|
||||
try {
|
||||
Credentials credentials = (Credentials) Current.get(Current.Credentials);
|
||||
if (Current.HasMachine())
|
||||
credentials.machine_id = Current.getMachine().id;
|
||||
if (Current.HasUser())
|
||||
credentials.user_id = Current.getUser().id;
|
||||
if (Current.HasCompiler())
|
||||
credentials.compiler_id = Current.getCompiler().id;
|
||||
if (Current.HasMakefile())
|
||||
credentials.makefile_id = Current.getMakefile().id;
|
||||
if (Current.HasRunConfiguration())
|
||||
credentials.runconfiguration_id = Current.getRunConfiguration().id;
|
||||
Update(credentials);
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void UpdateCredentials() {
|
||||
try {
|
||||
|
||||
@@ -37,15 +37,6 @@ public class DebugForm implements DebugWindow, FormWithSplitters {
|
||||
return content;
|
||||
}
|
||||
@Override
|
||||
public void SaveSplitters() {
|
||||
FormWithSplitters.super.SaveSplitters();
|
||||
try {
|
||||
Global.db.SaveCredentials();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void DropRunTasksComparison() {
|
||||
singleRunTaskMaster.RemoveObject();
|
||||
singleRunTaskSlave.RemoveObject();
|
||||
|
||||
@@ -62,6 +62,8 @@ public class MainForm extends Form implements MainWindow {
|
||||
if (UI.debugWindow != null)
|
||||
((FormWithSplitters) UI.debugWindow).SaveSplitters();
|
||||
//--
|
||||
Global.db.SaveCredentials();
|
||||
//--
|
||||
Global.FinishApplication();
|
||||
}
|
||||
public MainForm() {
|
||||
|
||||
Reference in New Issue
Block a user