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
b5adae59
Commit
b5adae59
authored
Oct 27, 2006
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ImageValueViewer now works and the viewer control is refreshed
parent
3a68ae3f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
3 deletions
+13
-3
src/gui/control/card_viewer.cpp
src/gui/control/card_viewer.cpp
+4
-0
src/gui/control/card_viewer.hpp
src/gui/control/card_viewer.hpp
+2
-0
src/render/card/viewer.cpp
src/render/card/viewer.cpp
+1
-0
src/render/card/viewer.hpp
src/render/card/viewer.hpp
+3
-0
src/script/scriptable.hpp
src/script/scriptable.hpp
+2
-2
src/util/string.cpp
src/util/string.cpp
+1
-1
No files found.
src/gui/control/card_viewer.cpp
View file @
b5adae59
...
...
@@ -25,6 +25,10 @@ wxSize CardViewer::DoGetBestSize() const {
}
}
void
CardViewer
::
onChange
()
{
Refresh
(
false
);
}
void
CardViewer
::
onPaint
(
wxPaintEvent
&
)
{
wxBufferedPaintDC
dc
(
this
);
dc
.
BeginDrawing
();
...
...
src/gui/control/card_viewer.hpp
View file @
b5adae59
...
...
@@ -23,6 +23,8 @@ class CardViewer : public wxControl, public DataViewer {
/// Return the desired size of control
virtual
wxSize
DoGetBestSize
()
const
;
virtual
void
onChange
();
private:
DECLARE_EVENT_TABLE
();
...
...
src/render/card/viewer.cpp
View file @
b5adae59
...
...
@@ -88,6 +88,7 @@ void DataViewer::setData(IndexMap<FieldP,ValueP>& values) {
FOR_EACH
(
v
,
viewers
)
{
v
->
setValue
(
values
[
v
->
getField
()]);
}
onChange
();
}
...
...
src/render/card/viewer.hpp
View file @
b5adae59
...
...
@@ -67,6 +67,9 @@ class DataViewer : public SetView {
/// Update the viewers and forward actions
virtual
void
onAction
(
const
Action
&
,
bool
undone
);
/// Notification that the total image has changed
virtual
void
onChange
()
{}
private:
vector
<
ValueViewerP
>
viewers
;
///< The viewers for the different values in the data
};
...
...
src/script/scriptable.hpp
View file @
b5adae59
...
...
@@ -84,8 +84,8 @@ class Scriptable {
}
private:
T
value
;
///< The actual value
OptionalScript
script
;
///< The optional script
T
value
;
///< The scripted value
DECLARE_REFLECTION
();
};
...
...
@@ -100,7 +100,7 @@ void Reader::handle(Scriptable<T>& s) {
s
.
script
.
unparsed
=
s
.
script
.
unparsed
.
substr
(
7
);
s
.
script
.
parse
(
*
this
);
}
else
{
handle
(
value
);
handle
(
s
.
value
);
}
}
template
<
typename
T
>
...
...
src/util/string.cpp
View file @
b5adae59
...
...
@@ -53,7 +53,7 @@ String trim(const String& s){
}
String
trim_left
(
const
String
&
s
)
{
size_t
start
=
s
.
find_first_not_of
(
_
(
' '
));
size_t
start
=
s
.
find_first_not_of
(
_
(
"
\t
"
));
if
(
start
==
String
::
npos
)
{
return
String
();
}
else
{
...
...
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