mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-23 18:39:55 +00:00
Minor changes when accessing "properties_grid" widget
This commit is contained in:
parent
18bbc271a1
commit
616f74ae2d
@ -81,9 +81,9 @@ public:
|
|||||||
m_document->add_observer(this);
|
m_document->add_observer(this);
|
||||||
|
|
||||||
if (countCels() > 0) {
|
if (countCels() > 0) {
|
||||||
ui::Grid* mainGrid = g_window->propertiesGrid();
|
|
||||||
m_userDataView.configureAndSet(
|
m_userDataView.configureAndSet(
|
||||||
(m_cel ? m_cel->data()->userData(): UserData()), mainGrid);
|
(m_cel ? m_cel->data()->userData(): UserData()),
|
||||||
|
g_window->propertiesGrid());
|
||||||
}
|
}
|
||||||
else if (!m_cel)
|
else if (!m_cel)
|
||||||
m_userDataView.setVisible(false, false);
|
m_userDataView.setVisible(false, false);
|
||||||
|
@ -160,8 +160,8 @@ public:
|
|||||||
m_document->add_observer(this);
|
m_document->add_observer(this);
|
||||||
|
|
||||||
if (countLayers() > 0) {
|
if (countLayers() > 0) {
|
||||||
ui::Grid* mainGrid = g_window->propertiesGrid();
|
m_userDataView.configureAndSet(m_layer->userData(),
|
||||||
m_userDataView.configureAndSet(m_layer->userData(), mainGrid);
|
g_window->propertiesGrid());
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFromLayer();
|
updateFromLayer();
|
||||||
|
@ -49,8 +49,8 @@ public:
|
|||||||
{
|
{
|
||||||
userData()->Click.connect([this]{ onToggleUserData(); });
|
userData()->Click.connect([this]{ onToggleUserData(); });
|
||||||
|
|
||||||
ui::Grid* mainGrid = propertiesGrid();
|
m_userDataView.configureAndSet(m_sprite->userData(),
|
||||||
m_userDataView.configureAndSet(m_sprite->userData(), mainGrid);
|
propertiesGrid());
|
||||||
|
|
||||||
remapWindow();
|
remapWindow();
|
||||||
centerWindow();
|
centerWindow();
|
||||||
|
@ -31,8 +31,7 @@ SliceWindow::SliceWindow(const doc::Sprite* sprite,
|
|||||||
ASSERT(!slices.empty());
|
ASSERT(!slices.empty());
|
||||||
|
|
||||||
Slice* slice = slices.frontAs<Slice>();
|
Slice* slice = slices.frontAs<Slice>();
|
||||||
auto mainGrid = findChildT<ui::Grid>("properties_grid");
|
m_userDataView.configureAndSet(slice->userData(), propertiesGrid());
|
||||||
m_userDataView.configureAndSet(slice->userData(), mainGrid);
|
|
||||||
userData()->Click.connect([this]{ onToggleUserData(); });
|
userData()->Click.connect([this]{ onToggleUserData(); });
|
||||||
|
|
||||||
if (slices.size() == 1) {
|
if (slices.size() == 1) {
|
||||||
|
@ -30,8 +30,7 @@ TagWindow::TagWindow(const doc::Sprite* sprite, const doc::Tag* tag)
|
|||||||
, m_userData(tag->userData())
|
, m_userData(tag->userData())
|
||||||
, m_userDataView(Preferences::instance().tags.userDataVisibility)
|
, m_userDataView(Preferences::instance().tags.userDataVisibility)
|
||||||
{
|
{
|
||||||
auto mainGrid = findChildT<ui::Grid>("properties_grid");
|
m_userDataView.configureAndSet(m_userData, propertiesGrid());
|
||||||
m_userDataView.configureAndSet(m_userData, mainGrid);
|
|
||||||
|
|
||||||
name()->setText(tag->name());
|
name()->setText(tag->name());
|
||||||
from()->setTextf("%d", tag->fromFrame()+m_base);
|
from()->setTextf("%d", tag->fromFrame()+m_base);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user