fixed: packages can now be upgraded from installers, their status was not updated

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1112 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-08 23:53:20 +00:00
parent 0556bc2f31
commit e575af3320
+6
View File
@@ -181,6 +181,7 @@ PackagesWindow::PackagesWindow(Window* parent, const InstallerP& installer)
init(parent, true);
// add installer
merge(installable_packages, new_intrusive1<DownloadableInstaller>(installer));
FOR_EACH(p, installable_packages) p->determineStatus();
// mark all packages in the installer for installation
FOR_EACH(ip, installable_packages) {
if (ip->can(PACKAGE_INSTALL)) {
@@ -280,6 +281,11 @@ void PackagesWindow::onOk(wxCommandEvent& ev) {
if ((ip->status & PACKAGE_MODIFIED) == PACKAGE_MODIFIED) with_modifications++;
}
}
// anything to do?
if (!to_change) {
ev.Skip();
return;
}
// Warn about removing
if (to_remove) {
int result = wxMessageBox(