Skip to content

Commit

Permalink
dynamic_cast of filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Suthiro committed Apr 17, 2021
1 parent 4795ee0 commit abcbd5a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libscidavis/src/future/table/TableView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,16 @@ void TableView::applyType()
break;
}
col->setColumnMode(new_mode, converter);
static_cast<DateTime2StringFilter*>(col->outputFilter())->setFormat(format);
static_cast<String2DateTimeFilter*>(col->inputFilter())->setFormat(format);
{
auto filter = dynamic_cast<DateTime2StringFilter *>(col->outputFilter());
if (nullptr != filter)
filter->setFormat(format);
}
{
auto filter = dynamic_cast<String2DateTimeFilter *>(col->inputFilter());
if (nullptr != filter)
filter->setFormat(format);
}
col->endMacro();
}
break;
Expand Down

0 comments on commit abcbd5a

Please sign in to comment.