Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
a98bcb50
Commit
a98bcb50
authored
Sep 21, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crash when copying cards with has_styling
parent
1d5be59a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
src/data/card.cpp
src/data/card.cpp
+2
-0
src/data/format/clipboard.cpp
src/data/format/clipboard.cpp
+9
-0
No files found.
src/data/card.cpp
View file @
a98bcb50
...
@@ -67,6 +67,8 @@ IMPLEMENT_REFLECTION(Card) {
...
@@ -67,6 +67,8 @@ IMPLEMENT_REFLECTION(Card) {
}
else
if
(
stylesheet_for_reading
())
{
}
else
if
(
stylesheet_for_reading
())
{
REFLECT_IF_READING
styling_data
.
init
(
stylesheet_for_reading
()
->
styling_fields
);
REFLECT_IF_READING
styling_data
.
init
(
stylesheet_for_reading
()
->
styling_fields
);
REFLECT
(
styling_data
);
REFLECT
(
styling_data
);
}
else
if
(
tag
.
reading
())
{
has_styling
=
false
;
// We don't know the style, this can be because of copy/pasting
}
}
}
}
REFLECT
(
notes
);
REFLECT
(
notes
);
...
...
src/data/format/clipboard.cpp
View file @
a98bcb50
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include <data/card.hpp>
#include <data/card.hpp>
#include <data/set.hpp>
#include <data/set.hpp>
#include <data/game.hpp>
#include <data/game.hpp>
#include <data/stylesheet.hpp>
#include <data/keyword.hpp>
#include <data/keyword.hpp>
#include <util/io/package.hpp>
#include <util/io/package.hpp>
#include <script/scriptable.hpp>
#include <script/scriptable.hpp>
...
@@ -59,7 +60,15 @@ wxDataFormat CardDataObject::format = _("application/x-mse-card");
...
@@ -59,7 +60,15 @@ wxDataFormat CardDataObject::format = _("application/x-mse-card");
CardDataObject
::
CardDataObject
(
const
SetP
&
set
,
const
CardP
&
card
)
{
CardDataObject
::
CardDataObject
(
const
SetP
&
set
,
const
CardP
&
card
)
{
WrappedCard
data
=
{
set
->
game
.
get
(),
set
->
game
->
name
(),
card
};
WrappedCard
data
=
{
set
->
game
.
get
(),
set
->
game
->
name
(),
card
};
bool
has_styling
=
card
->
has_styling
&&
!
card
->
stylesheet
;
if
(
has_styling
)
{
// set the stylsheet, so when deserializing we know whos style options we are reading
card
->
stylesheet
=
set
->
stylesheet
;
}
SetText
(
serialize_for_clipboard
(
*
set
,
data
));
SetText
(
serialize_for_clipboard
(
*
set
,
data
));
if
(
has_styling
)
{
card
->
stylesheet
=
StyleSheetP
();
// restore card
}
SetFormat
(
format
);
SetFormat
(
format
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment