diff --git a/GUI/EvtMainFrame.cpp b/GUI/EvtMainFrame.cpp
index 2af7451..5f38a80 100644
--- a/GUI/EvtMainFrame.cpp
+++ b/GUI/EvtMainFrame.cpp
@@ -199,6 +199,10 @@ void EvtMainFrame::openSaveDirEvent(wxCommandEvent&) {
wxExecute("explorer.exe " + Utility::Directory::toNativeSeparators(_manager.saveDirectory()));
}
+void EvtMainFrame::stagingSelectionEvent(wxCommandEvent&) {
+ updateCommandsState();
+}
+
void EvtMainFrame::stagingButtonEvent(wxCommandEvent&) {
wxExecute("explorer.exe " + Utility::Directory::toNativeSeparators(_manager.stagingAreaDirectory()));
}
@@ -379,10 +383,11 @@ void EvtMainFrame::getActiveSlot() {
void EvtMainFrame::updateCommandsState() {
long selection = _installedListView->GetFirstSelected();
+ int staged_selection = _stagingList->GetSelection();
GameState game_state = _manager.gameState();
HangarState hangar_state = _manager.hangarState(selection);
- _importButton->Enable(selection != -1 && game_state != GameState::Running);
+ _importButton->Enable(selection != -1 && staged_selection != -1 && game_state != GameState::Running);
_exportButton->Enable(selection != -1);
_moveButton->Enable(selection != -1 && game_state != GameState::Running && hangar_state != HangarState::Empty && hangar_state != HangarState::Invalid);
_deleteButton->Enable(selection != -1 && game_state != GameState::Running && hangar_state != HangarState::Empty);
diff --git a/GUI/EvtMainFrame.h b/GUI/EvtMainFrame.h
index ed006c2..c7efaf3 100644
--- a/GUI/EvtMainFrame.h
+++ b/GUI/EvtMainFrame.h
@@ -39,6 +39,7 @@ class EvtMainFrame: public MainFrame {
void deleteEvent(wxCommandEvent&);
void backupEvent(wxCommandEvent&);
void openSaveDirEvent(wxCommandEvent&);
+ void stagingSelectionEvent(wxCommandEvent&);
void stagingButtonEvent(wxCommandEvent&);
void installedSelectionEvent(wxListEvent&);
void listColumnDragEvent(wxListEvent&);
diff --git a/GUI/MainFrame.cpp b/GUI/MainFrame.cpp
index 41e4dc5..eb3b10e 100644
--- a/GUI/MainFrame.cpp
+++ b/GUI/MainFrame.cpp
@@ -130,6 +130,7 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
_openSaveDirButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openSaveDirEvent ), NULL, this );
_importButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importEvent ), NULL, this );
_exportButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportEvent ), NULL, this );
+ _stagingList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this );
_stagingAreaButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this );
this->Connect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( MainFrame::gameCheckTimerEvent ) );
}
@@ -143,6 +144,7 @@ MainFrame::~MainFrame()
_openSaveDirButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::openSaveDirEvent ), NULL, this );
_importButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::importEvent ), NULL, this );
_exportButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::exportEvent ), NULL, this );
+ _stagingList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( MainFrame::stagingSelectionEvent ), NULL, this );
_stagingAreaButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::stagingButtonEvent ), NULL, this );
this->Disconnect( wxID_ANY, wxEVT_TIMER, wxTimerEventHandler( MainFrame::gameCheckTimerEvent ) );
diff --git a/GUI/MainFrame.fbp b/GUI/MainFrame.fbp
index ca42d6c..727a02a 100644
--- a/GUI/MainFrame.fbp
+++ b/GUI/MainFrame.fbp
@@ -691,6 +691,7 @@
+ stagingSelectionEvent