Fix interaction with snapshot list
* Select snapshot before showing relevant context menu * Ignore clicks on empty space (no path)
This commit is contained in:
parent
46f61d7662
commit
c6ef4c3545
@ -84,6 +84,10 @@ EditorSnapshots::button_press (GdkEventButton* ev)
|
|||||||
int cx;
|
int cx;
|
||||||
int cy;
|
int cy;
|
||||||
_snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy);
|
_snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy);
|
||||||
|
if (!path) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_snapshot_display.get_selection()->select (path);
|
||||||
Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path);
|
Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path);
|
||||||
if (iter) {
|
if (iter) {
|
||||||
Gtk::TreeModel::Row row = *iter;
|
Gtk::TreeModel::Row row = *iter;
|
||||||
@ -97,6 +101,9 @@ EditorSnapshots::button_press (GdkEventButton* ev)
|
|||||||
int cy;
|
int cy;
|
||||||
string snap_name;
|
string snap_name;
|
||||||
_snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy);
|
_snapshot_display.get_path_at_pos ((int) ev->x, (int) ev->y, path, col, cx, cy);
|
||||||
|
if (!path) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path);
|
Gtk::TreeModel::iterator iter = _snapshot_model->get_iter (path);
|
||||||
if (iter) {
|
if (iter) {
|
||||||
Gtk::TreeModel::Row row = *iter;
|
Gtk::TreeModel::Row row = *iter;
|
||||||
|
Loading…
Reference in New Issue
Block a user