summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
authorThales Lima <thaleslima.ufu@gmail.com>2017-10-21 11:57:45 -0200
committerThales Lima <thaleslima.ufu@gmail.com>2017-10-21 11:57:45 -0200
commitb1b026397c58c45c46ca7a525fb1e98b20ddfab8 (patch)
tree224130696322c70d8296119603b36b7fcee3cc25 /Project/Workspace.cpp
parentf6a410c1c23bb0cf75d218354cb1f7e21c420fb3 (diff)
downloadPSP.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.cpp8
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);