summaryrefslogtreecommitdiffstats
path: root/Project/TextForm.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-09-04 20:05:30 -0300
committerGitHub <noreply@github.com>2017-09-04 20:05:30 -0300
commit926af7f34aaf5aebdbac0cbc550ed75647874258 (patch)
tree4df26f8c631aeeeed6e5c9e8aab87c4c663bd30f /Project/TextForm.cpp
parent17d1dd82ec065eff08546ef1fd2a188ce77471b2 (diff)
parent6f3421c4150e49af026432a2a2be0171d741ad03 (diff)
downloadPSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.gz
PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.xz
PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.zip
Merge pull request #33 from Thales1330/wip/electromechanical-calc
Wip electromechanical calc
Diffstat (limited to 'Project/TextForm.cpp')
-rw-r--r--Project/TextForm.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Project/TextForm.cpp b/Project/TextForm.cpp
index b33c64b..b2624ba 100644
--- a/Project/TextForm.cpp
+++ b/Project/TextForm.cpp
@@ -3,6 +3,7 @@
TextForm::TextForm(wxWindow* parent, Text* text, std::vector<Element*> elementList, double systemPowerBase)
: TextFormBase(parent)
{
+ SetSize(GetBestSize());
m_parent = parent;
m_textToEdit = text;
m_allElements.GetElementsFromList(elementList);
@@ -773,7 +774,7 @@ void TextForm::ElementTypeChoice()
case TYPE_BUS: {
for(int i = 0; i < (int)m_allElements.GetBusList().size(); i++) {
Bus* bus = m_allElements.GetBusList()[i];
- arrayString.Add(bus->GetEletricalData().name);
+ arrayString.Add(bus->GetElectricalData().name);
}
} break;
case TYPE_SYNC_GENERATOR: {
@@ -1004,8 +1005,8 @@ void TextForm::DataTypeChoice()
Bus* bus1 = static_cast<Bus*>(line->GetParentList()[0]);
Bus* bus2 = static_cast<Bus*>(line->GetParentList()[1]);
- wxString bus1Name = bus1->GetEletricalData().name;
- wxString bus2Name = bus2->GetEletricalData().name;
+ wxString bus1Name = bus1->GetElectricalData().name;
+ wxString bus2Name = bus2->GetElectricalData().name;
m_choiceTextFromBus->Append(bus1Name);
m_choiceTextFromBus->Append(bus2Name);
@@ -1026,8 +1027,8 @@ void TextForm::DataTypeChoice()
Bus* bus1 = static_cast<Bus*>(transformer->GetParentList()[0]);
Bus* bus2 = static_cast<Bus*>(transformer->GetParentList()[1]);
- wxString bus1Name = bus1->GetEletricalData().name;
- wxString bus2Name = bus2->GetEletricalData().name;
+ wxString bus1Name = bus1->GetElectricalData().name;
+ wxString bus2Name = bus2->GetElectricalData().name;
m_choiceTextFromBus->Append(bus1Name);
m_choiceTextFromBus->Append(bus2Name);