diff options
author | Thales Lima <thaleslima.ufu@gmail.com> | 2017-10-21 11:57:45 -0200 |
---|---|---|
committer | Thales Lima <thaleslima.ufu@gmail.com> | 2017-10-21 11:57:45 -0200 |
commit | b1b026397c58c45c46ca7a525fb1e98b20ddfab8 (patch) | |
tree | 224130696322c70d8296119603b36b7fcee3cc25 /Project/Workspace.cpp | |
parent | f6a410c1c23bb0cf75d218354cb1f7e21c420fb3 (diff) | |
download | PSP.git-b1b026397c58c45c46ca7a525fb1e98b20ddfab8.tar.gz PSP.git-b1b026397c58c45c46ca7a525fb1e98b20ddfab8.tar.xz PSP.git-b1b026397c58c45c46ca7a525fb1e98b20ddfab8.zip |
Several changes and bugfixes to compile the program on linux (ubuntu-xenial-amb64)
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r-- | Project/Workspace.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index 97be7b4..c1bf800 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -1185,8 +1185,10 @@ void Workspace::CopySelection() } } ElementDataObject* dataObject = new ElementDataObject(selectedElements); - wxTheClipboard->SetData(dataObject); - wxTheClipboard->Close(); + if(wxTheClipboard->Open()) { + wxTheClipboard->SetData(dataObject); + wxTheClipboard->Close(); + } } bool Workspace::Paste() @@ -1194,7 +1196,7 @@ bool Workspace::Paste() if(wxTheClipboard->Open()) { ElementDataObject dataObject; - if(wxTheClipboard->IsSupported(wxDataFormat("PSPCopy"))) { + if(wxTheClipboard->IsSupported(dataObject.GetFormat())) { if(!wxTheClipboard->GetData(dataObject)) { wxMessageDialog dialog(this, _("It was not possible to paste from clipboard."), _("Error"), wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition); |