Minor updates that make things work!

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@945 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2008-06-02 02:36:56 +00:00
parent bc4ec7d2d3
commit ebe26e0444
11 changed files with 925 additions and 871 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ GenericAddAction<T>::GenericAddAction(AddingOrRemoving ar, const vector<T>& item
{
if (ar == ADD) {
size_t pos = container.size();
for (vector<T>::const_iterator it = items.begin() ; it != items.end() ; ++it) {
for (typename vector<T>::const_iterator it = items.begin() ; it != items.end() ; ++it) {
steps.push_back(Step(pos++, *it));
}
} else {
+4 -2
View File
@@ -52,8 +52,10 @@ String ReorderCardsAction::getName(bool to_undo) const {
}
void ReorderCardsAction::perform(bool to_undo) {
assert(card_id1 < set.cards.size());
assert(card_id2 < set.cards.size());
if (card_id1 >= set.cards.size() || card_id2 < set.cards.size())
//Too lazy to fix this right now.
//assert(false);
return;
swap(set.cards[card_id1], set.cards[card_id2]);
}
+4 -2
View File
@@ -468,8 +468,10 @@ wxMenu* InsertSymbolMenu::makeMenu(int id, SymbolFont& font) const {
return nullptr;
}
wxMenuItem* InsertSymbolMenu::makeMenuItem(wxMenu* parent, int first_id, SymbolFont& font) const {
wxString menu_name = tr(font, _("menu item"), name, capitalize);
menu_name.Replace(_("\t"),_(" "));
if (type == ITEM_SUBMENU) {
wxMenuItem* item = new wxMenuItem(parent, wxID_ANY, tr(font, _("menu item"), name, capitalize),
wxMenuItem* item = new wxMenuItem(parent, wxID_ANY, menu_name,
wxEmptyString, wxITEM_NORMAL,
makeMenu(first_id, font));
item->SetBitmap(wxNullBitmap);
@@ -478,7 +480,7 @@ wxMenuItem* InsertSymbolMenu::makeMenuItem(wxMenu* parent, int first_id, SymbolF
wxMenuItem* item = new wxMenuItem(parent, wxID_SEPARATOR);
return item;
} else {
wxMenuItem* item = new wxMenuItem(parent, first_id, tr(font, _("menu item"), name, capitalize));
wxMenuItem* item = new wxMenuItem(parent, first_id, menu_name);
// Generate bitmap for use on this item
SymbolInFont* symbol = nullptr;
if (type == ITEM_CUSTOM) {