initial commit
This commit is contained in:
@@ -137,9 +137,8 @@ void FolderAddChild::redo()
|
||||
Node::ConnectEdge(child_, NodeInput(folder_, Folder::kChildInput, array_index));
|
||||
|
||||
if (autoposition_) {
|
||||
old_position_ = child_->GetPosition();
|
||||
if (!position_command_) {
|
||||
position_command_ = new NodeSetPositionAsChildCommand(child_, folder_, array_index, array_index+1, true);
|
||||
position_command_ = new NodeSetPositionAsChildCommand(child_, folder_, folder_->project(), array_index, array_index+1, true);
|
||||
}
|
||||
position_command_->redo();
|
||||
}
|
||||
|
||||
@@ -180,8 +180,6 @@ private:
|
||||
|
||||
bool autoposition_;
|
||||
|
||||
QPointF old_position_;
|
||||
|
||||
NodeSetPositionAsChildCommand* position_command_;
|
||||
|
||||
};
|
||||
|
||||
@@ -42,14 +42,14 @@ Project::Project() :
|
||||
// Adds a color manager "node" to this project so that it synchronizes
|
||||
color_manager_ = new ColorManager();
|
||||
color_manager_->setParent(this);
|
||||
color_manager_->SetPosition(QPointF(1, 0));
|
||||
SetNodePosition(color_manager_, this, QPointF(1, 0));
|
||||
color_manager_->SetCanBeDeleted(false);
|
||||
AddDefaultNode(color_manager_);
|
||||
|
||||
// Same with project settings
|
||||
settings_ = new ProjectSettingsNode();
|
||||
settings_->setParent(this);
|
||||
settings_->SetPosition(QPointF(2, 0));
|
||||
SetNodePosition(settings_, this, QPointF(2, 0));
|
||||
settings_->SetCanBeDeleted(false);
|
||||
AddDefaultNode(settings_);
|
||||
|
||||
@@ -58,6 +58,7 @@ Project::Project() :
|
||||
root_->setParent(this);
|
||||
root_->SetLabel(tr("Root"));
|
||||
root_->SetCanBeDeleted(false);
|
||||
SetNodePosition(root_, this, QPointF(0, 0));
|
||||
|
||||
connect(color_manager(), &ColorManager::ValueChanged,
|
||||
this, &Project::ColorManagerValueChanged);
|
||||
|
||||
Reference in New Issue
Block a user