summary refs log tree commit diff stats
path: root/tools/mapedit
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 17:21:10 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 17:21:10 -0400
commitb2ad90fef0e31a1d8635b817940d9bf71320b588 (patch)
tree496566d4ed85113fd968df6ea61cb8af29d73c7d /tools/mapedit
parentaf9488a0a557e79dbf69c0b433e90a44fedb06a8 (diff)
downloadtherapy-b2ad90fef0e31a1d8635b817940d9bf71320b588.tar.gz
therapy-b2ad90fef0e31a1d8635b817940d9bf71320b588.tar.bz2
therapy-b2ad90fef0e31a1d8635b817940d9bf71320b588.zip
Fixed bug with starting position label going under the adjacent button in map editor
Diffstat (limited to 'tools/mapedit')
-rw-r--r--tools/mapedit/src/frame.cpp6
-rw-r--r--tools/mapedit/src/frame.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/mapedit/src/frame.cpp b/tools/mapedit/src/frame.cpp index 2540175..2f85905 100644 --- a/tools/mapedit/src/frame.cpp +++ b/tools/mapedit/src/frame.cpp
@@ -155,14 +155,13 @@ MapeditFrame::MapeditFrame(std::unique_ptr<World> world) : wxFrame(NULL, wxID_AN
155 mapEditor->frame = this; 155 mapEditor->frame = this;
156 156
157 // Set up property editor 157 // Set up property editor
158 wxPanel* propertyEditor = new wxPanel(layout3, wxID_ANY);//, wxDefaultPosition, wxSize(-1, 100)); 158 propertyEditor = new wxPanel(layout3, wxID_ANY);//, wxDefaultPosition, wxSize(-1, 100));
159 titleBox = new UndoableTextBox(propertyEditor, MAP_TITLE_TEXTBOX, currentMap->getTitle(), "Edit Map Title", this); 159 titleBox = new UndoableTextBox(propertyEditor, MAP_TITLE_TEXTBOX, currentMap->getTitle(), "Edit Map Title", this);
160 titleBox->SetMaxLength(40); 160 titleBox->SetMaxLength(40);
161 161
162 wxStaticText* titleLabel = new wxStaticText(propertyEditor, wxID_ANY, "Title:"); 162 wxStaticText* titleLabel = new wxStaticText(propertyEditor, wxID_ANY, "Title:");
163 163
164 startposLabel = new wxStaticText(propertyEditor, wxID_ANY, "Starting Position:"); 164 startposLabel = new wxStaticText(propertyEditor, wxID_ANY, "Starting Position:");
165 SetStartposLabel();
166 165
167 setStartposButton = new wxButton(propertyEditor, SET_STARTPOS_BUTTON, "Set Starting Position"); 166 setStartposButton = new wxButton(propertyEditor, SET_STARTPOS_BUTTON, "Set Starting Position");
168 cancelStartposButton = new wxButton(propertyEditor, CANCEL_STARTPOS_BUTTON, "Cancel"); 167 cancelStartposButton = new wxButton(propertyEditor, CANCEL_STARTPOS_BUTTON, "Cancel");
@@ -257,6 +256,8 @@ MapeditFrame::MapeditFrame(std::unique_ptr<World> world) : wxFrame(NULL, wxID_AN
257 dontSelectMap = true; 256 dontSelectMap = true;
258 mapTree->SelectItem(currentMap->getTreeItemId()); 257 mapTree->SelectItem(currentMap->getTreeItemId());
259 dontSelectMap = false; 258 dontSelectMap = false;
259
260 SetStartposLabel();
260} 261}
261 262
262void MapeditFrame::OnExit(wxCloseEvent& event) 263void MapeditFrame::OnExit(wxCloseEvent& event)
@@ -731,6 +732,7 @@ void MapeditFrame::SetStartposLabel()
731 mappos_out << ")"; 732 mappos_out << ")";
732 733
733 startposLabel->SetLabel(mappos_out.str()); 734 startposLabel->SetLabel(mappos_out.str());
735 propertyEditor->GetSizer()->SetSizeHints(propertyEditor);
734} 736}
735 737
736void MapeditFrame::UpdateUndoLabels() 738void MapeditFrame::UpdateUndoLabels()
diff --git a/tools/mapedit/src/frame.h b/tools/mapedit/src/frame.h index ffa6c7d..d201e86 100644 --- a/tools/mapedit/src/frame.h +++ b/tools/mapedit/src/frame.h
@@ -78,6 +78,7 @@ class MapeditFrame : public wxFrame {
78 wxMenu* menuFile; 78 wxMenu* menuFile;
79 wxSplitterWindow* layout1; 79 wxSplitterWindow* layout1;
80 wxSplitterWindow* layout3; 80 wxSplitterWindow* layout3;
81 wxPanel* propertyEditor;
81 82
82 // Notebook 83 // Notebook
83 wxNotebook* notebook; 84 wxNotebook* notebook;