Fixed: card box not resized when rotating cards

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@309 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-29 23:00:20 +00:00
parent 710a852172
commit 60cc0c6a16
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -67,9 +67,9 @@ Rotation DataViewer::getRotation() const {
// ----------------------------------------------------------------------------- : Setting data
void DataViewer::setCard(const CardP& card) {
void DataViewer::setCard(const CardP& card, bool refresh) {
if (!card) return; // TODO: clear viewer?
if (this->card == card && this->stylesheet == set->stylesheetFor(card)) return; // already set
if (!refresh && this->card == card && this->stylesheet == set->stylesheetFor(card)) return; // already set
assert(set);
this->card = card;
stylesheet = set->stylesheetFor(card);
@@ -124,7 +124,7 @@ ValueViewerP DataViewer::makeViewer(const StyleP& style) {
void DataViewer::onAction(const Action& action, bool undone) {
TYPE_CASE_(action, DisplayChangeAction) {
// refresh
setCard(card);
setCard(card, true);
return;
}
TYPE_CASE(action, ValueAction) {
+2 -1
View File
@@ -60,7 +60,8 @@ class DataViewer : public SetView {
// --------------------------------------------------- : Setting data
/// Display a card in this viewer
void setCard(const CardP& card);
/** \param refresh: Always refresh, even if this card is already shown */
void setCard(const CardP& card, bool refresh = false);
// --------------------------------------------------- : The viewers
protected: