mirror of
https://github.com/Fishwaldo/ozw-admin.git
synced 2025-03-15 19:31:38 +00:00
Fix Crash on accessing invalid Flags
This commit is contained in:
parent
167180c9ac
commit
5aa5f01fea
2 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ void Node_Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|||
|
||||
QSize Node_Delegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
NodeFlagsWidget fw;
|
||||
fw.setValue(index.data().value<QBitArray>());
|
||||
return fw.sizeHint();
|
||||
|
|
|
@ -56,7 +56,7 @@ NodeFlagsWidget::~NodeFlagsWidget()
|
|||
|
||||
void NodeFlagsWidget::setValue(QBitArray value) {
|
||||
this->m_value = value;
|
||||
for (int i = 0; i <= value.size(); i++) {
|
||||
for (int i = 0; i < this->m_value.size(); i++) {
|
||||
switch (i) {
|
||||
case QTOZW_Nodes::nodeFlags::isAwake:
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue