[chronojump] genericWindow treeview edit/delete better sensitivity
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] genericWindow treeview edit/delete better sensitivity
- Date: Mon, 16 Sep 2019 15:00:39 +0000 (UTC)
commit 0ba32d0663ea501112c315fb1e355633409c96fa
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Sep 16 17:00:22 2019 +0200
genericWindow treeview edit/delete better sensitivity
src/gui/encoder.cs | 1 +
src/gui/forceSensor.cs | 1 +
src/gui/genericWindow.cs | 11 +++++++++++
3 files changed, 13 insertions(+)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 236b9b31..086d45ae 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1794,6 +1794,7 @@ public partial class ChronoJumpWindow
}
genericWin.ShowEditRow(false);
+ genericWin.SensitiveEditDeleteIfSelected();
//remove signal from gui just in case the edited signal is the same we have loaded
removeSignalFromGuiBecauseDeletedOrCancelled();
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 205e2895..b5e56b74 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -1437,6 +1437,7 @@ LogB.Information(" re R ");
}
genericWin.ShowEditRow(false);
+ genericWin.SensitiveEditDeleteIfSelected();
//remove signal from gui just in case the edited signal is the same we have loaded
//removeSignalFromGuiBecauseDeletedOrCancelled();
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index cd78189d..7a4246b9 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -668,6 +668,17 @@ public class GenericWindow
ShowEditRow(false);
}
+ public void SensitiveEditDeleteIfSelected()
+ {
+ TreeIter iter = new TreeIter();
+ TreeModel myModel = treeview.Model;
+ if (treeview.Selection.GetSelected (out myModel, out iter))
+ {
+ button_treeviewload_row_edit.Sensitive = true;
+ button_treeviewload_row_delete.Sensitive = true;
+ }
+ }
+
//get the selected
public int TreeviewSelectedRowID() {
TreeIter iter = new TreeIter();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]