diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-11 10:09:05 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-11 10:09:05 -0400 |
commit | 1fe53ae878356633d0d14e456945f6466ef28e51 (patch) | |
tree | 1712d431937f3cc2b838f5ae61649981003bce49 /src | |
parent | f801cd592d02eb1a95f6e215cd6fbe7aea631fae (diff) | |
download | lingo-ap-tracker-1fe53ae878356633d0d14e456945f6466ef28e51.tar.gz lingo-ap-tracker-1fe53ae878356633d0d14e456945f6466ef28e51.tar.bz2 lingo-ap-tracker-1fe53ae878356633d0d14e456945f6466ef28e51.zip |
Prevent editing paintings pane cells
Diffstat (limited to 'src')
-rw-r--r-- | src/paintings_pane.cpp | 4 | ||||
-rw-r--r-- | src/paintings_pane.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/paintings_pane.cpp b/src/paintings_pane.cpp index 51c4995..bf5d71b 100644 --- a/src/paintings_pane.cpp +++ b/src/paintings_pane.cpp | |||
@@ -36,6 +36,8 @@ PaintingsPane::PaintingsPane(wxWindow* parent) : wxPanel(parent, wxID_ANY) { | |||
36 | 36 | ||
37 | SetSizerAndFit(top_sizer); | 37 | SetSizerAndFit(top_sizer); |
38 | 38 | ||
39 | tree_ctrl_->Bind(wxEVT_DATAVIEW_ITEM_START_EDITING, | ||
40 | &PaintingsPane::OnStartEditingCell, this); | ||
39 | reveal_btn_->Bind(wxEVT_BUTTON, &PaintingsPane::OnClickRevealPaintings, this); | 41 | reveal_btn_->Bind(wxEVT_BUTTON, &PaintingsPane::OnClickRevealPaintings, this); |
40 | } | 42 | } |
41 | 43 | ||
@@ -80,3 +82,5 @@ void PaintingsPane::OnClickRevealPaintings(wxCommandEvent& event) { | |||
80 | 82 | ||
81 | AP_RevealPaintings(); | 83 | AP_RevealPaintings(); |
82 | } | 84 | } |
85 | |||
86 | void PaintingsPane::OnStartEditingCell(wxDataViewEvent& event) { event.Veto(); } | ||
diff --git a/src/paintings_pane.h b/src/paintings_pane.h index 2b79286..1d14510 100644 --- a/src/paintings_pane.h +++ b/src/paintings_pane.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <wx/wx.h> | 7 | #include <wx/wx.h> |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | class wxDataViewEvent; | ||
10 | class wxDataViewTreeCtrl; | 11 | class wxDataViewTreeCtrl; |
11 | 12 | ||
12 | class PaintingsPane : public wxPanel { | 13 | class PaintingsPane : public wxPanel { |
@@ -18,6 +19,7 @@ class PaintingsPane : public wxPanel { | |||
18 | 19 | ||
19 | private: | 20 | private: |
20 | void OnClickRevealPaintings(wxCommandEvent& event); | 21 | void OnClickRevealPaintings(wxCommandEvent& event); |
22 | void OnStartEditingCell(wxDataViewEvent& event); | ||
21 | 23 | ||
22 | wxDataViewTreeCtrl* tree_ctrl_; | 24 | wxDataViewTreeCtrl* tree_ctrl_; |
23 | wxButton* reveal_btn_; | 25 | wxButton* reveal_btn_; |