Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and use 3d mode stored with layout #2138 #4442

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion xLights/LayoutPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ LayoutPanel::LayoutPanel(wxWindow* parent, xLightsFrame *xl, wxPanel* sequencer)
is_3d = config->ReadBool("LayoutMode3D", false);
bool allow_3d_previews = true; //false; //set to false for previous behavior

CheckBox_3D->SetValue(is_3d);
CheckBox_3D->SetValue(is_3d);
xlights->GetHousePreview()->Set3D(is_3d);

if (!allow_3d_previews && is_3d)
Expand Down Expand Up @@ -8921,6 +8921,7 @@ void LayoutPanel::OnCheckBox_3DClick(wxCommandEvent& event)

wxConfigBase* config = wxConfigBase::Get();
config->Write("LayoutMode3D", is_3d);
xlights->SetXmlSetting("LayoutMode3D", is_3d ? "1" : "0");
Refresh();
}

Expand Down
4 changes: 4 additions & 0 deletions xLights/TabSequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ wxString xLightsFrame::LoadEffectsFileNoCheck()
root->AddChild(SettingsNode);
SetXmlSetting("previewWidth", "1280");
SetXmlSetting("previewHeight", "720");
SetXmlSetting("LayoutMode3D", "0");
UnsavedRgbEffectsChanges = true;
}
int previewWidth = wxAtoi(GetXmlSetting("previewWidth", "1280"));
Expand Down Expand Up @@ -374,6 +375,9 @@ wxString xLightsFrame::LoadEffectsFileNoCheck()
modelPreview->SetBackgroundBrightness(layoutPanel->GetBackgroundBrightnessForSelectedPreview(), layoutPanel->GetBackgroundAlphaForSelectedPreview());
modelPreview->SetScaleBackgroundImage(layoutPanel->GetBackgroundScaledForSelectedPreview());
}
bool is_3d = GetXmlSetting("LayoutMode3D", "0") == "1";
modelPreview->Set3D(is_3d);
layoutPanel->CheckBox_3D->SetValue(is_3d);

UpdateLayoutSave();
UpdateControllerSave();
Expand Down
2 changes: 2 additions & 0 deletions xLights/TabSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,8 @@ void xLightsFrame::InitialiseControllersTab(bool rebuildPropGrid) {
List_Controllers->EnsureVisible(itemSelected);
}

Panel2->SetMinSize(wxSize(400, -1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is your secret Controller Panel change to prevent squished buttons....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes ... not so secret. How is it working for you? Isnt it always collapsed into nothing?
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enhancement request :-) #4443

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't like how the right panel is coming up squished. Not sure if it saves that position once you move it back over.

Panel5->SetMinSize(wxSize(600, -1));
List_Controllers->Thaw();

Panel2->Layout();
Expand Down