##// END OF EJS Templates
Restored multi "Zone" selection...
jeandet -
r1386:31710669118f
parent child
Show More
@@ -14,6 +14,7
14 #include <Actions/ActionsGuiController.h>
14 #include <Actions/ActionsGuiController.h>
15 #include <Actions/FilteringAction.h>
15 #include <Actions/FilteringAction.h>
16 #include <Common/MimeTypesDef.h>
16 #include <Common/MimeTypesDef.h>
17 #include <Common/containers.h>
17 #include <Data/ArrayData.h>
18 #include <Data/ArrayData.h>
18 #include <Data/IDataSeries.h>
19 #include <Data/IDataSeries.h>
19 #include <Data/SpectrogramSeries.h>
20 #include <Data/SpectrogramSeries.h>
@@ -940,7 +941,17 void VisualizationGraphWidget::mousePressEvent(QMouseEvent *event)
940 impl->setSelectionZonesEditionEnabled(true);
941 impl->setSelectionZonesEditionEnabled(true);
941 if ((event->modifiers() == Qt::ControlModifier) && (selectedZone != nullptr))
942 if ((event->modifiers() == Qt::ControlModifier) && (selectedZone != nullptr))
942 {
943 {
943 selectedZone->setAssociatedEditedZones(parentVisualizationWidget()->selectionZoneManager().selectedItems());
944 auto alreadySelectedZones = parentVisualizationWidget()->selectionZoneManager().selectedItems();
945 selectedZone->setAssociatedEditedZones(alreadySelectedZones);
946 if(SciQLop::containers::contains(alreadySelectedZones, selectedZone))
947 {
948 alreadySelectedZones.removeOne(selectedZone);
949 }
950 else
951 {
952 alreadySelectedZones.append(selectedZone);
953 }
954 parentVisualizationWidget()->selectionZoneManager().select(alreadySelectedZones);
944 }
955 }
945 else
956 else
946 {
957 {
General Comments 0
You need to be logged in to leave comments. Login now