Select new styles in the styles manager when they are created.

Originally committed to SVN as r4799.
This commit is contained in:
Thomas Goyne 2010-10-11 20:05:52 +00:00
parent ed9968e172
commit dade679145
2 changed files with 33 additions and 87 deletions

View File

@ -58,6 +58,36 @@
#include "subs_grid.h"
#include "utils.h"
/// IDs
enum {
BUTTON_CATALOG_NEW = 1000,
BUTTON_CATALOG_DELETE,
BUTTON_STORAGE_COPYTO,
BUTTON_STORAGE_NEW,
BUTTON_STORAGE_EDIT,
BUTTON_STORAGE_COPY,
BUTTON_STORAGE_DELETE,
BUTTON_STORAGE_UP,
BUTTON_STORAGE_DOWN,
BUTTON_STORAGE_TOP,
BUTTON_STORAGE_BOTTOM,
BUTTON_STORAGE_SORT,
BUTTON_CURRENT_COPYTO,
BUTTON_CURRENT_NEW,
BUTTON_CURRENT_EDIT,
BUTTON_CURRENT_COPY,
BUTTON_CURRENT_DELETE,
BUTTON_CURRENT_IMPORT,
BUTTON_CURRENT_UP,
BUTTON_CURRENT_DOWN,
BUTTON_CURRENT_TOP,
BUTTON_CURRENT_BOTTOM,
BUTTON_CURRENT_SORT,
LIST_CATALOG,
LIST_STORAGE,
LIST_CURRENT
};
/// @brief Constructor
/// @param parent
/// @param _grid
@ -741,6 +771,7 @@ void DialogStyleManager::OnStorageNew (wxCommandEvent &) {
Store.style.push_back(temp);
Store.Save(CatalogList->GetString(CatalogList->GetSelection()));
LoadStorageStyles();
StorageList->SetStringSelection(temp->name);
}
else delete temp;
UpdateMoveButtons();
@ -755,6 +786,7 @@ void DialogStyleManager::OnCurrentNew (wxCommandEvent &) {
if (modified) {
grid->ass->InsertStyle(temp);
LoadCurrentStyles(grid->ass);
CurrentList->SetStringSelection(temp->name);
}
else delete temp;
UpdateMoveButtons();

View File

@ -208,92 +208,6 @@ public:
DECLARE_EVENT_TABLE()
};
///////
// IDs
enum {
/// DOCME
BUTTON_CATALOG_NEW = 1000,
/// DOCME
BUTTON_CATALOG_DELETE,
/// DOCME
BUTTON_STORAGE_COPYTO,
/// DOCME
BUTTON_STORAGE_NEW,
/// DOCME
BUTTON_STORAGE_EDIT,
/// DOCME
BUTTON_STORAGE_COPY,
/// DOCME
BUTTON_STORAGE_DELETE,
/// DOCME
BUTTON_STORAGE_UP,
/// DOCME
BUTTON_STORAGE_DOWN,
/// DOCME
BUTTON_STORAGE_TOP,
/// DOCME
BUTTON_STORAGE_BOTTOM,
/// DOCME
BUTTON_STORAGE_SORT,
/// DOCME
BUTTON_CURRENT_COPYTO,
/// DOCME
BUTTON_CURRENT_NEW,
/// DOCME
BUTTON_CURRENT_EDIT,
/// DOCME
BUTTON_CURRENT_COPY,
/// DOCME
BUTTON_CURRENT_DELETE,
/// DOCME
BUTTON_CURRENT_IMPORT,
/// DOCME
BUTTON_CURRENT_UP,
/// DOCME
BUTTON_CURRENT_DOWN,
/// DOCME
BUTTON_CURRENT_TOP,
/// DOCME
BUTTON_CURRENT_BOTTOM,
/// DOCME
BUTTON_CURRENT_SORT,
/// DOCME
LIST_CATALOG,
/// DOCME
LIST_STORAGE,
/// DOCME
LIST_CURRENT
};
/// DOCME
/// @class DialogStyleManagerEvent
/// @brief DOCME