Make control lines buttons react to line counts

Set the "apply" and "delete all" button sensitivity based on the number
of control lines. Add extra tooltip text to the apply button when
editing and there is not enough lines. The text explains there must be
enough vertical or horizontal control lines.
This commit is contained in:
Lawrence Lee
2021-05-30 18:02:29 -07:00
parent ef49d9eefd
commit 2c1e6a8ca1
5 changed files with 63 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ protected:
bool draw_mode;
bool drawing_line;
bool edited;
size_t horizontalCount, verticalCount;
Cairo::RefPtr<RTSurface> line_icon_h, line_icon_v;
Cairo::RefPtr<RTSurface> line_icon_h_prelight, line_icon_v_prelight;
int prev_obj;
@@ -87,6 +88,10 @@ public:
~ControlLineManager();
bool getEdited(void) const;
/** Returns the number of horizontal control lines. */
size_t getHorizontalCount(void) const;
/** Returns the number of vertical control lines. */
size_t getVerticalCount(void) const;
void removeAll(void);
/** Sets whether or not the lines are visible and interact-able. */
void setActive(bool active);