Improve performance for drag and drop

- Changing the style sheets for the selection frame dynamically considerably
  slowed down the handling of the mouse events.
  Instead two separate widgets with fixed style sheets are now used.
- Recreating the macro segments after dropping a widget took too much
  time leading to unresponsive drop operations
This commit is contained in:
WarmUpTill
2022-03-20 19:51:05 +01:00
committed by WarmUpTill
parent 1ab9a38914
commit e0763a4957
7 changed files with 75 additions and 61 deletions

View File

@@ -298,8 +298,6 @@ public slots:
void on_close_clicked();
private:
void SetSelection(MacroSegmentList *, int);
MacroSegmentList *conditionsList = nullptr;
MacroSegmentList *actionsList = nullptr;

View File

@@ -62,8 +62,10 @@ signals:
protected:
Section *_section;
QLabel *_headerInfo;
QFrame *_frame;
QVBoxLayout *_selectionFrameLayout;
QWidget *_frame;
QFrame *_noBorderframe;
QFrame *_borderFrame;
QVBoxLayout *_contentLayout;
private:
virtual MacroSegment *Data() = 0;