Merge pull request #2560 from okrc/main
fixed issue with the display about cmbDefault
This commit is contained in:
commit
dfc74b2114
|
@ -1267,7 +1267,11 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList<CSandBoxPtr>& SandB
|
|||
|
||||
SB_STATUS Status = SandBoxes.first()->RenameBox(Value.replace(" ", "_"));
|
||||
if (!Status.IsError())
|
||||
{
|
||||
RenameItem(OldValue.replace(" ", "_"), Value.replace(" ", "_"));
|
||||
if (theAPI->GetGlobalSettings()->GetText("DefaultBox", "DefaultBox").compare(OldValue.replace(" ", "_"), Qt::CaseInsensitive) == 0)
|
||||
theAPI->GetGlobalSettings()->SetText("DefaultBox", Value.replace(" ", "_"));
|
||||
}
|
||||
Results.append(Status);
|
||||
}
|
||||
else if (Action == m_pMenuRecover)
|
||||
|
|
|
@ -635,9 +635,10 @@ void CSettingsWindow::LoadSettings()
|
|||
QTreeWidgetItem* pItem = new QTreeWidgetItem();
|
||||
AddRunItem(NameCmd.first, NameCmd.second);
|
||||
}
|
||||
|
||||
|
||||
ui.cmbDefault->clear();
|
||||
foreach(const CSandBoxPtr & pBox, theAPI->GetAllBoxes())
|
||||
ui.cmbDefault->addItem(pBox->GetName().replace("_", ""), pBox->GetName());
|
||||
ui.cmbDefault->addItem(pBox->GetName().replace("_", " "), pBox->GetName());
|
||||
int pos = ui.cmbDefault->findData(theAPI->GetGlobalSettings()->GetText("DefaultBox", "DefaultBox"));
|
||||
if(pos == -1)
|
||||
pos = ui.cmbDefault->findData("DefaultBox");
|
||||
|
|
Loading…
Reference in New Issue