Gui: fix regression: show commands of selected category in Toolbar tab
This commit is contained in:
@@ -85,8 +85,6 @@ public:
|
||||
AccelLineEdit *currentShortcut = nullptr);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* e) override;
|
||||
|
||||
/** @name Internal helper function for handling command list widgets
|
||||
*/
|
||||
//@{
|
||||
@@ -115,6 +113,7 @@ protected Q_SLOTS:
|
||||
void onModifyMacroAction(const QByteArray&) override;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* e) override;
|
||||
void changeEvent(QEvent *e) override;
|
||||
void setShortcutOfCurrentAction(const QString&);
|
||||
|
||||
|
||||
@@ -782,6 +782,17 @@ void DlgCustomToolbarsImp::moveDownCustomCommand(const QString& name, const QByt
|
||||
}
|
||||
}
|
||||
|
||||
void DlgCustomToolbarsImp::showEvent(QShowEvent* event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
// If we did this already in the constructor we wouldn't get the vertical scrollbar if needed.
|
||||
// The problem was noticed with Qt 4.1.4 but may arise with any later version.
|
||||
if (firstShow) {
|
||||
ui->categoryBox->activated(ui->categoryBox->currentIndex());
|
||||
firstShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
void DlgCustomToolbarsImp::changeEvent(QEvent *e)
|
||||
{
|
||||
DlgCustomToolbars::changeEvent(e);
|
||||
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
~DlgCustomToolbarsImp() override;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* e) override;
|
||||
void changeEvent(QEvent *e) override;
|
||||
void addCustomToolbar(const QString&) override;
|
||||
void removeCustomToolbar(const QString&) override;
|
||||
@@ -114,6 +115,7 @@ protected:
|
||||
private:
|
||||
QList<QAction*> getActionGroup(QAction*);
|
||||
void setActionGroup(QAction*, const QList<QAction*>& group);
|
||||
bool firstShow = true;
|
||||
};
|
||||
|
||||
/** This class implements the creation of user defined toolbox bars.
|
||||
|
||||
Reference in New Issue
Block a user