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
88410daa
Commit
88410daa
authored
Jul 05, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Card preview on style panel is refreshed when styling changes
parent
f431e8f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
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/gui/set/style_panel.cpp
src/gui/set/style_panel.cpp
+14
-0
No files found.
src/gui/control/card_viewer.cpp
View file @
88410daa
...
@@ -38,6 +38,10 @@ void CardViewer::redraw(const ValueViewer& v) {
...
@@ -38,6 +38,10 @@ void CardViewer::redraw(const ValueViewer& v) {
}
}
void
CardViewer
::
onChange
()
{
void
CardViewer
::
onChange
()
{
redraw
();
}
void
CardViewer
::
redraw
()
{
if
(
drawing
)
return
;
if
(
drawing
)
return
;
up_to_date
=
false
;
up_to_date
=
false
;
Refresh
(
false
);
Refresh
(
false
);
...
...
src/gui/control/card_viewer.hpp
View file @
88410daa
...
@@ -30,6 +30,8 @@ class CardViewer : public wxControl, public DataViewer {
...
@@ -30,6 +30,8 @@ class CardViewer : public wxControl, public DataViewer {
/** May NOT be called while in onPaint/draw */
/** May NOT be called while in onPaint/draw */
shared_ptr
<
DC
>
overdrawDC
();
shared_ptr
<
DC
>
overdrawDC
();
/// Invalidate and redraw the entire viewer
void
redraw
();
/// Invalidate and redraw (the area of) a single value viewer
/// Invalidate and redraw (the area of) a single value viewer
virtual
void
redraw
(
const
ValueViewer
&
);
virtual
void
redraw
(
const
ValueViewer
&
);
...
...
src/gui/set/style_panel.cpp
View file @
88410daa
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
#include <data/card.hpp>
#include <data/card.hpp>
#include <data/stylesheet.hpp>
#include <data/stylesheet.hpp>
#include <data/action/set.hpp>
#include <data/action/set.hpp>
#include <data/action/value.hpp>
DECLARE_TYPEOF_COLLECTION
(
FieldP
);
// ----------------------------------------------------------------------------- : StylePanel
// ----------------------------------------------------------------------------- : StylePanel
...
@@ -68,6 +71,17 @@ void StylePanel::onAction(const Action& action, bool undone) {
...
@@ -68,6 +71,17 @@ void StylePanel::onAction(const Action& action, bool undone) {
editor
->
showCard
(
card
);
editor
->
showCard
(
card
);
}
}
}
}
TYPE_CASE
(
action
,
ValueAction
)
{
// is it a styling action?
const
StyleSheet
&
s
=
set
->
stylesheetFor
(
card
);
FOR_EACH_CONST
(
f
,
s
.
styling_fields
)
{
if
(
action
.
valueP
->
fieldP
==
f
)
{
// refresh the viewer
preview
->
redraw
();
return
;
}
}
}
use_for_all
->
Enable
(
card
&&
card
->
stylesheet
);
use_for_all
->
Enable
(
card
&&
card
->
stylesheet
);
use_custom_options
->
Enable
(
card
);
use_custom_options
->
Enable
(
card
);
use_custom_options
->
SetValue
(
card
->
has_styling
);
use_custom_options
->
SetValue
(
card
->
has_styling
);
...
...
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