mirror of
https://github.com/isledecomp/SIEdit.git
synced 2024-11-30 10:56:51 -05:00
mainwindow: don't bother showing empty objects
This commit is contained in:
parent
4009e0c278
commit
365c08c5aa
1 changed files with 9 additions and 0 deletions
|
@ -151,6 +151,10 @@ void MainWindow::SetPanel(Panel *panel, si::Object *chunk)
|
||||||
auto current = static_cast<Panel*>(config_stack_->currentWidget());
|
auto current = static_cast<Panel*>(config_stack_->currentWidget());
|
||||||
current->SetData(nullptr);
|
current->SetData(nullptr);
|
||||||
|
|
||||||
|
if (chunk && chunk->type() == MxOb::Null) {
|
||||||
|
chunk = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
config_stack_->setCurrentWidget(panel);
|
config_stack_->setCurrentWidget(panel);
|
||||||
panel->SetData(chunk);
|
panel->SetData(chunk);
|
||||||
last_set_data_ = chunk;
|
last_set_data_ = chunk;
|
||||||
|
@ -163,6 +167,11 @@ void MainWindow::SetPanel(Panel *panel, si::Object *chunk)
|
||||||
m_LocationEdit->SetValue(chunk->location_);
|
m_LocationEdit->SetValue(chunk->location_);
|
||||||
m_UpEdit->SetValue(chunk->up_);
|
m_UpEdit->SetValue(chunk->up_);
|
||||||
start_time_edit_->setValue(chunk->time_offset_);
|
start_time_edit_->setValue(chunk->time_offset_);
|
||||||
|
} else {
|
||||||
|
m_extraEdit->setPlainText(QString());
|
||||||
|
m_LocationEdit->SetValue(si::Vector3(0, 0, 0));
|
||||||
|
m_UpEdit->SetValue(si::Vector3(0, 0, 0));
|
||||||
|
start_time_edit_->setValue(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue