Compare commits

..
Author SHA1 Message Date
Hanif Koh c0822cfaf5 Free macOS Disk Space Only When the Build Might Not Fit 2026-10-11 18:19:23 +08:00
16 changed files with 302 additions and 633 deletions
+7
View File
@@ -179,6 +179,13 @@ jobs:
if: runner.os == 'macOS' && !inputs.macos-combine-only && !vars.SELF_HOSTED
run: |
df -hI /
# Deleting the unused Xcodes takes minutes, so only do it when the
# build might not fit. A cold build uses under 4 GiB after this step.
avail_gib=$(df -g / | awk 'NR == 2 { print $4 }')
if [ "$avail_gib" -ge 15 ]; then
echo "$avail_gib GiB free, enough for the build"
exit 0
fi
# Keep only the selected Xcode
xcode=$(basename "$(cd "$(xcode-select -p)/../.." && pwd -P)")
sudo find /Applications -maxdepth 1 -type d -name "Xcode_*.app" ! -name "$xcode" -exec rm -rf {} +
File diff suppressed because it is too large Load Diff
-2
View File
@@ -1,5 +1,3 @@
#pragma once
#include <string>
namespace Slic3r {
-2
View File
@@ -1,5 +1,3 @@
#pragma once
// paper: https://people.eecs.berkeley.edu/~jrs/meshpapers/GarlandHeckbert2.pdf
// sum up: https://users.csc.calpoly.edu/~zwood/teaching/csc570/final06/jseeba/
// inspiration: https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef libslic3r_Timer_hpp_
#define libslic3r_Timer_hpp_
#include "TriangleMesh.hpp"
@@ -9,3 +10,5 @@ public:
static TriangleMesh smooth_triangle_mesh(const TriangleMesh &mesh,bool& ok);
};
} // namespace Slic3r
#endif // libslic3r_Timer_hpp_
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef slic3r_GUI_SingleChoice_hpp_
#define slic3r_GUI_SingleChoice_hpp_
#include "GUI_Utils.hpp"
#include "Plater.hpp"
@@ -32,3 +33,5 @@ private:
};
}} // namespace Slic3r::GUI
#endif
+2 -15
View File
@@ -379,24 +379,14 @@ void FilamentGroupPopup::OnTimer(wxTimerEvent &event)
// leaving event got triggered. So the timer is stopped first, then started
// again, causing the popup being dismissed immediately.
// To fix this, we check if cursor is still inside the popup window before
// dismissing, and keep checking while it is: a leave event is not guaranteed
// to follow, and a popup left open keeps grabbing the mouse capture.
// dismissing.
wxPoint pos = this->ScreenToClient(wxGetMousePosition());
if (this->GetClientRect().Contains(pos)) {
StartTimer();
return;
}
if (this->GetClientRect().Contains(pos)) return;
#endif
Dismiss();
}
FilamentGroupPopup::~FilamentGroupPopup()
{
m_timer->Stop();
delete m_timer;
}
void FilamentGroupPopup::Dismiss() {
m_active = false;
PopupWindow::Dismiss();
@@ -415,10 +405,7 @@ void FilamentGroupPopup::OnEnterWindow(wxMouseEvent &)
// Ignore spurious ENTER synthesized by PopupWindow::OnMouseEvent2 on macOS.
wxPoint pos = this->ScreenToClient(wxGetMousePosition());
if (!this->GetClientRect().Contains(pos)) return;
// On macOS the timer keeps running instead, and OnTimer closes the popup once the cursor has left it.
#ifndef __APPLE__
ResetTimer();
#endif
}
void FilamentGroupPopup::UpdateButtonStatus(int hover_idx)
-1
View File
@@ -27,7 +27,6 @@ class FilamentGroupPopup : public PopupWindow
{
public:
FilamentGroupPopup(wxWindow *parent);
~FilamentGroupPopup() override;
void tryPopup(Plater* plater,PartPlate* plate, bool slice_all);
void tryClose();
void Dismiss() override;
-9
View File
@@ -20,8 +20,6 @@
#include <wx/gdicmn.h>
#include <wx/dialog.h>
#include "slic3r/GUI/FilamentMapPanel.hpp"
#include "slic3r/GUI/FilamentGroupPopup.hpp"
#include "slic3r/GUI/MainFrame.hpp"
namespace Slic3r { namespace GUI {
@@ -379,13 +377,6 @@ FilamentMapMode FilamentMapDialog::get_mode()
int FilamentMapDialog::ShowModal()
{
// The Slice-plate hover popup is a transient popup that keeps grabbing the mouse
// capture while shown. Left behind this modal dialog it would starve the dialog of
// mouse events, so close it synchronously first, whichever path opened the dialog.
if (MainFrame* frame = wxGetApp().mainframe;
frame && frame->m_filament_group_popup && frame->m_filament_group_popup->IsShown())
frame->m_filament_group_popup->Dismiss();
update_panel_status(m_page_type);
return wxDialog::ShowModal();
}
-2
View File
@@ -1,5 +1,3 @@
#pragma once
#import <Cocoa/Cocoa.h>
@interface OtherInstanceMessageHandlerMac : NSObject
+6
View File
@@ -2309,6 +2309,12 @@ wxBoxSizer* MainFrame::create_side_tools()
bool slice = true;
// The Slice-plate hover popup is a transient popup that keeps grabbing
// the mouse capture while shown. Left behind the modal grouping dialog it
// would starve that dialog of mouse events, so close it synchronously first.
if (m_filament_group_popup)
m_filament_group_popup->Dismiss();
auto curr_plate = m_plater->get_partplate_list().get_curr_plate();
#ifdef __linux__
PresetBundle* preset = wxGetApp().preset_bundle;
-2
View File
@@ -1,5 +1,3 @@
#pragma once
#include "slic3r/GUI/wxExtensions.hpp"
#include <map>
#include <cstdint>
-2
View File
@@ -1,5 +1,3 @@
#pragma once
#import <Cocoa/Cocoa.h>
@interface RemovableDriveManagerMM : NSObject
+2 -13
View File
@@ -17,7 +17,6 @@
BEGIN_EVENT_TABLE(SideButton, wxWindow)
EVT_LEFT_DOWN(SideButton::mouseDown)
EVT_LEFT_UP(SideButton::mouseReleased)
EVT_MOUSE_CAPTURE_LOST(SideButton::mouseCaptureLost)
EVT_PAINT(SideButton::paintEvent)
END_EVENT_TABLE()
@@ -332,30 +331,20 @@ void SideButton::mouseDown(wxMouseEvent& event)
event.Skip();
pressedDown = true;
SetFocus();
// Capturing twice pushes this button onto the capture stack twice, and the
// release would then hand the capture straight back to it.
if (!HasCapture())
CaptureMouse();
CaptureMouse();
}
void SideButton::mouseReleased(wxMouseEvent& event)
{
event.Skip();
// A press whose release went elsewhere still holds the capture.
if (HasCapture())
ReleaseMouse();
if (pressedDown) {
pressedDown = false;
ReleaseMouse();
if (wxRect({0, 0}, GetSize()).Contains(event.GetPosition()))
sendButtonEvent();
}
}
void SideButton::mouseCaptureLost(wxMouseCaptureLostEvent&)
{
pressedDown = false;
}
void SideButton::sendButtonEvent()
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
-1
View File
@@ -94,7 +94,6 @@ private:
void mouseDown(wxMouseEvent& event);
void mouseReleased(wxMouseEvent& event);
void mouseCaptureLost(wxMouseCaptureLostEvent& event);
void sendButtonEvent();
-2
View File
@@ -1,5 +1,3 @@
#pragma once
#include <wx/textctrl.h>
#include <wx/colour.h>