mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-03 03:49:59 +02:00
Fix losing Focus on moving diagram position with keyboard
Due to the changes made in the commit "Add highlight current page in ProjectView", there is a problem when moving diagrams in the ProjectView using the keyboard. The diagrams lose focus after being moved. The cause is: The DiagramItem loses its selection before the move function is executed. The code has been adjusted.
This commit is contained in:
@@ -171,6 +171,9 @@ class GenericPanel : public QTreeWidget {
|
||||
const QString &);
|
||||
|
||||
// various other methods
|
||||
public:
|
||||
void setSelectedItem(QTreeWidgetItem *selectedItem);
|
||||
|
||||
protected:
|
||||
virtual QString defaultText(QET::ItemType);
|
||||
virtual QIcon defaultIcon(QET::ItemType);
|
||||
@@ -222,5 +225,7 @@ class GenericPanel : public QTreeWidget {
|
||||
representing a title block template
|
||||
*/
|
||||
QHash<TitleBlockTemplateLocation, QTreeWidgetItem *> tb_templates_;
|
||||
|
||||
QTreeWidgetItem *m_selected_item = nullptr;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user