From e575af33207881001cd7f9977e1899369ab7ecaa Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 8 Aug 2008 23:53:20 +0000 Subject: [PATCH] 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 --- src/gui/packages_window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/packages_window.cpp b/src/gui/packages_window.cpp index 6c941bb4..3bdd959a 100644 --- a/src/gui/packages_window.cpp +++ b/src/gui/packages_window.cpp @@ -181,6 +181,7 @@ PackagesWindow::PackagesWindow(Window* parent, const InstallerP& installer) init(parent, true); // add installer merge(installable_packages, new_intrusive1(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(