Fix macOS issues found driving the app over MCP

set_window brings a window minimized while zoomed back to normal, and its documentation covers
raising windows and native dialogs. A right-click in the Design tab picks what it points at on
Retina displays, where the Design tab GUI tests now run too, and the Text dialog opens in a plain
font. The app no longer hangs when dialogs open and close with the display asleep, and no longer
crashes when a new project or a delete removes an object that has parts.
This commit is contained in:
SoftFever committed 2026-11-12 01:39:39 +08:00
1 parent 636367d143
commit a9c73c76b2
19 files changed
+157 -52

No files matched your search

+9
View File
@@ -1009,6 +1009,9 @@ wxDataViewItem ObjectDataViewModel::Delete(const wxDataViewItem &item)
}
if (node->m_type & itObject) {
// The plater deletes the ModelObject before its row, and on macOS each notification below
// has the control re-read the tree at once, so the row must not read it from here on.
node->m_model_object = nullptr;
auto it = find(m_objects.begin(), m_objects.end(), node);
if (it != m_objects.end())
{
@@ -1223,6 +1226,12 @@ wxDataViewItem ObjectDataViewModel::DeleteLastInstance(const wxDataViewItem &par
void ObjectDataViewModel::ResetAll()
{
// Every object row goes, and their ModelObjects may already be deleted (a new project clears the
// model first). On macOS each notification while the plates go has the control re-read the
// remaining rows at once, so none of them may read its ModelObject any more.
for (auto object : m_objects)
object->m_model_object = nullptr;
// BBS
// FIX: should remove from children collection soon, or will conflict GetChildren
while (!m_plates.empty()) {