workaround for world edge selector on MacOS
authoralfadur
Tue, 23 Jun 2020 02:04:00 +0300
changeset 15628 e63748a3aa52
parent 15627 ea189ee9394f
child 15629 c8f672ae2371
workaround for world edge selector on MacOS
QTfrontend/ui/page/pagescheme.cpp
QTfrontend/ui/page/pagescheme.h
--- a/QTfrontend/ui/page/pagescheme.cpp	Mon Jun 22 22:09:00 2020 +0300
+++ b/QTfrontend/ui/page/pagescheme.cpp	Tue Jun 23 02:04:00 2020 +0300
@@ -557,6 +557,7 @@
     connect(BtnCopy, SIGNAL(clicked()), this, SLOT(copyRow()));
     connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
     connect(BtnDelete, SIGNAL(clicked()), this, SLOT(deleteRow()));
+    connect(CB_WorldEdge, SIGNAL(currentIndexChanged(int)), this, SLOT(worldEdgeChanged(int)));
     mapper = new QDataWidgetMapper(this);
     connect(selectScheme, SIGNAL(currentIndexChanged(int)), mapper, SLOT(setCurrentIndex(int)));
     connect(selectScheme, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeSelected(int)));
@@ -684,6 +685,14 @@
     };
 }
 
+void PageScheme::worldEdgeChanged(int n)
+{
+    if (mapper->itemDelegate()) 
+    {
+        mapper->itemDelegate()->commitData(CB_WorldEdge);
+    }    
+}
+
 void PageScheme::schemeSelected(int n)
 {
     int c = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes;
--- a/QTfrontend/ui/page/pagescheme.h	Mon Jun 22 22:09:00 2020 +0300
+++ b/QTfrontend/ui/page/pagescheme.h	Tue Jun 23 02:04:00 2020 +0300
@@ -107,6 +107,7 @@
         void checkDupe();
 
     private slots:
+        void worldEdgeChanged(int);
         void schemeSelected(int);
         void dataChanged(QModelIndex topLeft, QModelIndex bottomRight);
 };