@@ -119,6 +119,12 @@ KsMainWindow::KsMainWindow(QWidget *parent)
connect(&_deselectShortcut, &QShortcut::activated,
this, &KsMainWindow::_deselect);
+ connect(&_mState, &KsDualMarkerSM::deselectA,
+ this, &KsMainWindow::_deselectA);
+
+ connect(&_mState, &KsDualMarkerSM::deselectB,
+ this, &KsMainWindow::_deselectB);
+
_resizeEmpty();
}
@@ -1137,3 +1143,27 @@ void KsMainWindow::_deselect()
_mState.updateLabels();
_graph.glPtr()->model()->update();
}
+
+void KsMainWindow::_deselectA()
+{
+ if (_mState.getState() == DualMarkerState::A)
+ _view.clearSelection();
+ else
+ _view.passiveMarkerSelectRow(KS_NO_ROW_SELECTED);
+
+ _mState.markerA().remove();
+ _mState.updateLabels();
+ _graph.glPtr()->model()->update();
+}
+
+void KsMainWindow::_deselectB()
+{
+ if (_mState.getState() == DualMarkerState::B)
+ _view.clearSelection();
+ else
+ _view.passiveMarkerSelectRow(KS_NO_ROW_SELECTED);
+
+ _mState.markerB().remove();
+ _mState.updateLabels();
+ _graph.glPtr()->model()->update();
+}
@@ -218,6 +218,10 @@ private:
void _deselect();
+ void _deselectA();
+
+ void _deselectB();
+
void _updateFilterMenu();
void _filterSyncCBoxUpdate(kshark_context *kshark_ctx);
Methods for deselecting Marker A and B are added to KsMainWindow. Those methods are connected to the "deselect" signals of the two marker buttons. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202327 Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> --- kernel-shark/src/KsMainWindow.cpp | 30 ++++++++++++++++++++++++++++++ kernel-shark/src/KsMainWindow.hpp | 4 ++++ 2 files changed, 34 insertions(+)