Skip to content

Commit

Permalink
Text bug fix and documentation update
Browse files Browse the repository at this point in the history
New fancy [PSP-UFU website](https://thales1330.github.io/PSP/) and [changelog](https://thales1330.github.io/PSP/blog) using [docusaurus](https://v2.docusaurus.io/);
Text element performance improved for OpenGL render;
Major text bug on copy fixed
  • Loading branch information
Thales1330 committed Aug 1, 2020
1 parent 7be97c3 commit 13d6443
Show file tree
Hide file tree
Showing 180 changed files with 29,827 additions and 16,954 deletions.
2 changes: 1 addition & 1 deletion Project/AboutForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AboutForm::~AboutForm() {}
void AboutForm::Init()
{
// Set program version. Format: (Alpha/Beta/Release) (YEAR)w(WEEK)(a/b/c/...)
m_staticTextVersion->SetLabel("2020w28a-beta");
m_staticTextVersion->SetLabel("2020w31a-beta");

// Create developers table
m_gridCredits->EnableGridLines(false);
Expand Down
20 changes: 18 additions & 2 deletions Project/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ void MainFrame::OnOpenClick(wxRibbonButtonBarEvent& event)
}
}

void MainFrame::OnPSPGuideClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnPSPGuideClick(wxRibbonButtonBarEvent& event)
{
wxLaunchDefaultBrowser("https://thales1330.github.io/PSP/docs/");
}
void MainFrame::OnPasteClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnPowerFlowClick(wxRibbonButtonBarEvent& event)
{
Expand Down Expand Up @@ -459,8 +462,10 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event)
if (workspace) {
if (workspace->GetWorkspaceMode() != Workspace::WorkspaceMode::MODE_INSERT) {
auto elementList = workspace->GetElementList();
auto textList = workspace->GetTextList();
wxString statusBarText = "";
bool newElement = false;
bool isText = false;

switch (event.GetId()) {
case ID_ADDMENU_BUS: {
Expand Down Expand Up @@ -541,10 +546,21 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event)
statusBarText = _("Insert Synchronous Condenser: Click on a buses, ESC to cancel.");
newElement = true;
} break;
case ID_ADDMENU_TEXT: {
Text* newText = new Text();
textList.push_back(newText);
statusBarText = _("Insert Text: Click to insert, ESC to cancel.");
newElement = true;
isText = true;
} break;
}
if (newElement) {
workspace->SetElementList(elementList);
workspace->SetWorkspaceMode(Workspace::WorkspaceMode::MODE_INSERT);
workspace->SetTextList(textList);
if(!isText)
workspace->SetWorkspaceMode(Workspace::WorkspaceMode::MODE_INSERT);
else
workspace->SetWorkspaceMode(Workspace::WorkspaceMode::MODE_INSERT_TEXT);
workspace->SetStatusBarText(statusBarText);
workspace->Redraw();
}
Expand Down
4 changes: 4 additions & 0 deletions Project/OpenGLText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,13 @@ OpenGLText* OpenGLText::GetCopy()
{
OpenGLText* copy = new OpenGLText();
*copy = *this;
copy->m_textCoord = nullptr;
copy->Init();

copy->m_textureID = nullptr;
copy->m_bitmapSize = wxSize(0, 0);
copy->m_bitmap = wxNullBitmap;

copy->SetText(copy->m_text);
return copy;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/01a85c17.0a6ca1f8.js → docs/01a85c17.ec0de5b7.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/08185850.135a38bd.js → docs/08185850.b523173f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/0b24b4d1.a6f3aa6d.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/0b24b4d1.c69912f7.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/1.63a834da.js → docs/1.c48a090e.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/1127cf6c.66c31da4.js → docs/1127cf6c.e9fac404.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/1533d792.fd57a7ad.js → docs/1533d792.44e9ff27.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13d6443

Please sign in to comment.